Use `[string_fragment template_substitution]+` pattern for scoped
injections per maintainer feedback, avoiding the cost of combined
injections. This requires splitting alternations into separate patterns
for the `fn()` and tagged template literal forms.
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Template literal injection queries previously captured the entire
`template_string` node with `injection.include-children`, which caused
template substitutions (e.g. `${expr}`) to be included in the injected
language's parse input. This broke highlighting in cases like:
html`<p class="static ${classMap({ dynamic })} after"></p>`
where the HTML parser's attribute_value node would span across the
template substitution gap, and the lit-html `${` injection query
(in html_tags) would match the buffer text at that range, injecting
JS at the wrong offset.
Two fixes:
1. ecma/injections.scm: capture `string_fragment` nodes instead of
`template_string`, and use `injection.combined` to merge them. This
aligns with upstream tree-sitter-javascript's approach. The `#offset!`
directives are removed since `string_fragment` already excludes the
backticks.
2. html_tags/injections.scm: anchor the lit-html `${` pattern with `^`
so it only matches attribute values that *start* with `${`, not
attribute values whose buffer text happens to contain `${` in the
middle (which occurs when the attribute_value node spans a template
substitution gap).
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: On macOS Apple Silicon, a plain unlink can leave stale code
signature metadata in the kernel cache, causing SIGKILL on next page
fault after `TSUpdate`.
Solution: Apply the rename-then-unlink strategy unconditionally instead
of only on Windows.
Problem: non-default "release" branch tracking is broken, but the
default branch contains grammar.json.
Solution: track default `main` branch and generate parser from JSON.
Problem: plenary.nvim as test runner is overkill and no longer
maintained.
Solution: Replace with a minimal fork based on Neovim API and vendored
luassert.
Problem: `vim.system` throws an error when `uv.spawn` fails, in
particular when `cmd` or `cwd` does not exist. This kills the coroutine,
which makes the corresponding async call hang.
Solution: Wrap `vim.system` in a function that catches any error and
returns it as `stderr` in a `SystemObj`.
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Breaking change: replaced `(variable_definition)` by
`(scalar_variable)`, `(list_variable)` and `(dictionary_variable)`.
Also mark queries as unmaintained.
parser PR: https://github.com/madskjeldgaard/tree-sitter-supercollider/pull/67
removed nodes:
control_structure, if, while, for, forby, method_call,
method_name, instance_variable_setter_call, argument_calls
added nodes:
class_def_body, !==, ===
modified nodes:
function_call now has fields receiver, name and arguments
chained method calls now appear as nested function_calls (where receiver
is another function_call)
Problem: The default `install_dir` is not normalized, leading to a
false positive checkhealth failure when comparing against the normalized
`runtimepath` directories.
Solution: Use trailing slash in default `install_dir`.
uv_fs_copyfile will truncate the target first, which can result in
hard-to-debug crashes if the shared object is currently in use.
instead, unlink the target first, so that the operation doesn't modify
any in-use files. the disk space from the old parsers won't be reclaimed
until any processes using them relinquish their open file handles.