Compare commits
7
Commits
ea637c9067
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7152cd6d4 | ||
|
|
514498ac37 | ||
|
|
bf636c95e2 | ||
|
|
4d670ae31f | ||
|
|
7a7d9e433e | ||
|
|
5f57d8516a | ||
|
|
d06341b26b |
@@ -0,0 +1,24 @@
|
||||
# tia-mason-registry
|
||||
|
||||
A custom [mason.nvim](https://github.com/mason-org/mason.nvim) registry that defines how to build and install the [`tia-lsp`](https://gitea.l-tech.rs/lazar/tia-lsp) language server for Siemens TIA Portal languages (SCL, with STL/AWL/LAD/FBD planned).
|
||||
|
||||
This repository is not meant to be used directly or installed as a standalone plugin. It contains a single package recipe (`packages/tia-lsp/package.yaml`) that mason reads to know how to download `tia-lsp`, compile its tree-sitter parser, and place the `tia-lsp` executable on PATH.
|
||||
|
||||
## Usage
|
||||
|
||||
See the [`tia-lsp.nvim` README](https://gitea.l-tech.rs/lazar/tia-lsp.nvim) for complete step-by-step installation instructions.
|
||||
|
||||
## How it works
|
||||
|
||||
1. Mason clones this registry to access `packages/tia-lsp/package.yaml`
|
||||
2. The recipe clones the [`tia-lsp`](https://gitea.l-tech.rs/lazar/tia-lsp) source repository
|
||||
3. It compiles `src/parser.c` into `parser.so` (the tree-sitter parser)
|
||||
4. It creates a `bin/tia-lsp` shell script that runs `lua src/main.lua`
|
||||
5. Mason places `tia-lsp` (and `parser.so`) in its managed package directory
|
||||
|
||||
## Requirements
|
||||
|
||||
- [mason.nvim](https://github.com/mason-org/mason.nvim) 2.x
|
||||
- [yq](https://github.com/mikefarah/yq) — required by mason to parse YAML registries (install via `:MasonInstall yq`)
|
||||
- C compiler (`cc`) — required to build `parser.so`
|
||||
- Lua 5.1+ — runtime for the LSP server
|
||||
@@ -10,7 +10,7 @@ categories:
|
||||
- LSP
|
||||
|
||||
source:
|
||||
id: pkg:generic/tia-lsp@0.1.0
|
||||
id: pkg:generic/tia-lsp@0.1.7
|
||||
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
|
||||
printf '#!/bin/bash\nexec lua "$(dirname "$0")/../src/main.lua" "$@"\n' > bin/tia-lsp
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user