nushell / nushell/tree-sitter-nu
Invalid node type "composite_type"
Open
Nobody has claimed this yet.
- Dominant language
- Nushell
- Stars
- 180
- Forks
- 38
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
Using NixOS, nushell 0.104.1 and LazyVim in neovim.
When running :checkhealth nvim-treesitter, I can see an error related to the nu parser
==============================================================================
nvim-treesitter: 1 ❌
Installation ~
- ✅ OK `tree-sitter` found 0.25.3 (parser generator, only needed for :TSInstallFromGrammar)
- ✅ OK `node` found v24.1.0 (only needed for :TSInstallFromGrammar)
- ✅ OK `git` executable found.
- ✅ OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: gcc (GCC) 14.2.1 20250322
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "x86_64",
release = "6.15.2-zen1",
sysname = "Linux",
version = "#1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980"
} ~
Parser/Features H L F I J
- c ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- csv ✓ . . . .
- diff ✓ . ✓ . ✓
- html ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- latex ✓ . ✓ . ✓
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- norg . . . . .
- nu x . ✓ ✓ ✓
- python ✓ ✓ ✓ ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- regex ✓ . . . .
- scss ✓ . ✓ ✓ ✓
- svelte ✓ ✓ ✓ ✓ ✓
- tsv ✓ . . . .
- tsx ✓ ✓ ✓ ✓ ✓
- turtle ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- typst ✓ . ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- vue ✓ . ✓ ✓ ✓
- yaml ✓ ✓ ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
The following errors have been detected: ~
- ❌ ERROR nu(highlights): ...d-0.11.2/share/nvim/runtime/lua/vim/treesitter/query.lua:373: Query error at 263:2. Invalid node type "composite_type":
(composite_type
^
nu(highlights) is concatenated from the following files:
| [ERROR]:"/home/dori/.local/share/nvim/lazy/tree-sitter-nu/queries/nu/highlights.scm", failed to load: ...d-0.11.2/share/nvim/runtime/lua/vim/treesitter/query.lua:373: Query error at 263:2. Invalid node type "composite_type":
(composite_type
^
Commenting lines 263~266 temporarily resolves the issue
; (composite_type
; "oneof" @type.enum
; ["<" ">"] @punctuation.bracket
; )
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with queries/nu/highlights.scm, especially lines 263–266, and reproduce the failure with :checkhealth nvim-treesitter. Compare the query's node reference with the grammar, then verify that the nu highlights check completes without the Invalid node type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100