Skip to content

Invalid node type "composite_type" #206

@AdrienLemaire

Description

@AdrienLemaire

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
; )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions