Files
tia-mason-registry/packages/tia-lsp/package.yaml
T
lazar 5f57d8516a 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').
2026-07-18 18:01:45 +02:00

32 lines
803 B
YAML

---
name: tia-lsp
description: Language server for Siemens TIA Portal languages (SCL, with planned STL/AWL, LAD, FBD support).
homepage: https://gitea.l-tech.rs/lazar/tia-lsp
licenses:
- MIT
languages:
- SCL
categories:
- LSP
source:
id: pkg:generic/tia-lsp@0.1.1
build:
env:
VERSION: "{{version}}"
run: |
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