Commit Graph
5 Commits
Author SHA1 Message Date
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
lazar d06341b26b fix: resolve symlink in bin wrapper with readlink -f
Mason's bin/ directory contains a symlink to the actual wrapper script
in packages/<name>/bin/. The wrapper used $(dirname "$0") which
resolved to mason/bin/ (the symlink location), then ../src/main.lua
pointed to mason/src/main.lua which doesn't exist.

Use readlink -f to resolve the symlink first, so dirname points to
packages/tia-lsp/bin/ and ../src/main.lua correctly resolves to
packages/tia-lsp/src/main.lua.
2026-07-18 16:58:13 +02:00
lazar ea637c9067 fix: pass version via env var instead of template in build script
The {{version}} template is only interpolated for the env: and asset:
fields, not for the build.run script (which is passed verbatim to bash).
Move the version into env: as VERSION="{{version}}" and reference it
as $VERSION in the script.
2026-07-18 16:47:18 +02:00
lazar f987b93f81 fix: replace heredoc with printf in build script
The heredoc inside the YAML block scalar (|) broke YAML parsing because
the heredoc body lines (#!/bin/bash, exec lua...) were at column 0,
which YAML interpreted as top-level keys. The ':' in the exec line
triggered 'could not find expected ':'' parse errors.

Replace with printf to keep the entire build script as properly-indented
YAML block scalar content. This also fixes the mason UI crash where the
newline-containing error message triggered 'replacement string item
contains newlines' in nvim_buf_set_lines.
2026-07-18 16:41:49 +02:00
lazar f2548fb41b Initial tia-lsp package definition
Mason registry for the tia-lsp language server. Uses pkg:generic source
with a build script that clones the tagged release from Gitea and creates
a bin/tia-lsp wrapper script that runs the Lua LSP server.
2026-07-18 11:47:33 +02:00