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').
This commit is contained in:
@@ -10,7 +10,7 @@ categories:
|
|||||||
- LSP
|
- LSP
|
||||||
|
|
||||||
source:
|
source:
|
||||||
id: pkg:generic/tia-lsp@0.1.0
|
id: pkg:generic/tia-lsp@0.1.1
|
||||||
build:
|
build:
|
||||||
env:
|
env:
|
||||||
VERSION: "{{version}}"
|
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
|
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
|
cp -r tia-lsp-src/src ./src
|
||||||
mkdir -p bin
|
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
|
printf '#!/bin/bash\nexec lua "$(dirname "$(readlink -f "$0")")/../src/main.lua" "$@"\n' > bin/tia-lsp
|
||||||
chmod +x bin/tia-lsp
|
chmod +x bin/tia-lsp
|
||||||
|
|
||||||
bin:
|
bin:
|
||||||
tia-lsp: bin/tia-lsp
|
tia-lsp: bin/tia-lsp
|
||||||
|
|
||||||
|
share:
|
||||||
|
parser.so: parser.so
|
||||||
|
|||||||
Reference in New Issue
Block a user