From 5f57d8516a167965dc6ce3f0bd82fb3f26eb774e Mon Sep 17 00:00:00 2001 From: Lazar Bulovan Date: Sat, 18 Jul 2026 18:01:45 +0200 Subject: [PATCH] feat: compile tree-sitter parser.so during install + bump to v0.1.1 The mason build script now compiles parser.c into parser.so using cc, so the plugin can load it via vim.treesitter.language.add() without requiring :TSInstall (which doesn't work for custom parsers in current nvim-treesitter). Also bumps the package version from @0.1.0 to @0.1.1 to include the semanticTokensProvider fix and the readlink symlink resolution fix. The parser.so is registered as a 'share' file so mason links it to a stable path. The plugin resolves it via exepath('tia-lsp'). --- packages/tia-lsp/package.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/tia-lsp/package.yaml b/packages/tia-lsp/package.yaml index 653009e..6a0bcd5 100644 --- a/packages/tia-lsp/package.yaml +++ b/packages/tia-lsp/package.yaml @@ -10,7 +10,7 @@ categories: - LSP source: - id: pkg:generic/tia-lsp@0.1.0 + id: pkg:generic/tia-lsp@0.1.1 build: env: VERSION: "{{version}}" @@ -18,8 +18,14 @@ source: git clone --depth 1 --branch "v$VERSION" https://gitea.l-tech.rs/lazar/tia-lsp.git tia-lsp-src cp -r tia-lsp-src/src ./src mkdir -p bin + cc -fPIC -I src/tree_sitter -c src/parser.c -o parser.o + cc -shared parser.o -o parser.so + rm -f parser.o printf '#!/bin/bash\nexec lua "$(dirname "$(readlink -f "$0")")/../src/main.lua" "$@"\n' > bin/tia-lsp chmod +x bin/tia-lsp bin: tia-lsp: bin/tia-lsp + +share: + parser.so: parser.so