nvim-treesitter / nvim-treesitter

Nvim Treesitter configurations and abstraction layer
Apache License 2.0
10.91k stars 908 forks source link

Tree Sitter Works Partially for Astro #5210

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug

I using TreeSitter for Astro. For some reason I'm getting some of the syntax highlighting when starting template of the HTML part in Astro like so:

image

I'm using the Lazy plugin manager.

  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
  },

And I have tailwindcss configured as my lsp config. (I'm using mason to install)

lspconfig.tailwindcss.setup {}

To Reproduce

Create a file like so:

--- 
interface Props {
    title: string;
}

const { title } = Astro.props;
---

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="description" content="Astro description">
        <meta name="viewport" content="width=device-width" />
        <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
        <meta name="generator" content={Astro.generator} />
    <script src="/htmx.min.js" is:inline />
        <title>{title}</title>
    </head>
    <body>
        <slot />
    </body>
</html>

Expected behavior

Full syntax highlighting

Output of :checkhealth nvim-treesitter

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.20.8 (d4c1bf7ce78051b7f4a381d1508d68928512ed5f) (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v18.16.1 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "6.2.0-26-generic",
  sysname = "Linux",
  version = "#26-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 23:39:54 UTC 2023"
} ~

Parser/Features         H L F I J
  - ada                 ✓ ✓ ✓ . .
  - agda                ✓ . ✓ . .
  - arduino             x ✓ x x ✓
  - astro               ✓ ✓ ✓ ✓ ✓
  - awk                 ✓ . . . ✓
  - bash                ✓ ✓ ✓ . ✓
  - bass                ✓ ✓ ✓ ✓ ✓
  - beancount           ✓ . ✓ . .
  - bibtex              ✓ . ✓ ✓ .
  - bicep               ✓ ✓ ✓ ✓ ✓
  - blueprint           ✓ . . . .
  - c                   x ✓ x x ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - capnp               ✓ ✓ ✓ ✓ ✓
  - chatito             ✓ ✓ ✓ ✓ ✓
  - clojure             ✓ ✓ ✓ . ✓
  - cmake               x . ✓ x .
  - comment             ✓ . . . .
  - commonlisp          ✓ ✓ ✓ . .
  - cooklang            ✓ . . . .
  - corn                ✓ ✓ ✓ ✓ .
  - cpon                ✓ ✓ ✓ ✓ ✓
  - cpp                 x ✓ x x ✓
  - css                 ✓ . ✓ ✓ ✓
  - cuda                x ✓ x x ✓
  - cue                 ✓ ✓ ✓ ✓ ✓
  - dart                ✓ ✓ ✓ ✓ ✓
  - devicetree          ✓ ✓ ✓ ✓ ✓
  - dhall               ✓ . ✓ . ✓
  - diff                ✓ . . . .
  - dockerfile          ✓ . . . ✓
  - dot                 ✓ . . . ✓
  - ebnf                ✓ . . . .
  - eex                 ✓ . . . ✓
  - elixir              ✓ ✓ ✓ ✓ ✓
  - elm                 ✓ . . . ✓
  - elsa                ✓ ✓ ✓ ✓ ✓
  - elvish              ✓ . . . ✓
  - embedded_template   ✓ . . . ✓
  - erlang              ✓ . ✓ . .
  - fennel              ✓ ✓ ✓ . ✓
  - firrtl              ✓ ✓ ✓ ✓ ✓
  - fish                ✓ ✓ ✓ ✓ ✓
  - foam                ✓ ✓ ✓ ✓ ✓
  - fortran             ✓ . ✓ ✓ .
  - fsh                 ✓ . . . .
  - func                ✓ . . . .
  - fusion              ✓ ✓ ✓ ✓ .
  - gdscript            ✓ ✓ ✓ ✓ ✓
  - git_config          ✓ . . . .
  - git_rebase          ✓ . . . ✓
  - gitattributes       ✓ . . . ✓
  - gitcommit           ✓ . . . ✓
  - gitignore           ✓ . . . .
  - gleam               ✓ ✓ ✓ ✓ ✓
  - glimmer             ✓ ✓ ✓ ✓ .
  - glsl                x ✓ x x ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - godot_resource      ✓ ✓ ✓ . .
  - gomod               ✓ . . . ✓
  - gosum               ✓ . . . .
  - gowork              ✓ . . . ✓
  - graphql             ✓ . . ✓ ✓
  - hack                ✓ . . . .
  - hare                ✓ ✓ ✓ ✓ ✓
  - haskell             ✓ . ✓ . ✓
  - hcl                 ✓ . ✓ ✓ ✓
  - heex                ✓ ✓ ✓ ✓ ✓
  - hjson               ✓ ✓ ✓ ✓ ✓
  - hlsl                x ✓ x x ✓
  - hocon               ✓ . . . ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - htmldjango          ✓ . ✓ ✓ ✓
  - http                ✓ . . . ✓
  - ini                 ✓ . ✓ . .
  - ispc                x ✓ x x ✓
  - janet_simple        ✓ ✓ ✓ . ✓
  - java                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - jq                  ✓ . . . ✓
  - jsdoc               ✓ . . . .
  - json                ✓ ✓ ✓ ✓ .
  - json5               ✓ . . . ✓
  - jsonc               ✓ ✓ ✓ ✓ ✓
  - jsonnet             ✓ . . . .
  - julia               x ✓ ✓ ✓ x
  - kdl                 ✓ ✓ ✓ ✓ ✓
  - kotlin              ✓ ✓ ✓ . ✓
  - lalrpop             ✓ ✓ . . ✓
  - latex               ✓ . ✓ . ✓
  - ledger              ✓ . ✓ ✓ ✓
  - llvm                ✓ . . . .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - luadoc              ✓ . . . .
  - luap                ✓ . . . .
  - luau                ✓ ✓ ✓ ✓ ✓
  - m68k                ✓ ✓ ✓ . ✓
  - make                ✓ . ✓ . ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - matlab              x x x x ✓
  - menhir              ✓ . . . ✓
  - mermaid             ✓ . . . .
  - meson               ✓ . ✓ . ✓
  - nickel              ✓ . . ✓ .
  - ninja               ✓ . ✓ ✓ .
  - nix                 ✓ ✓ ✓ . ✓
  - norg                . . . . .
  - objc                x ✓ x x ✓
  - ocaml               ✓ ✓ ✓ ✓ ✓
  - ocaml_interface     ✓ ✓ ✓ ✓ ✓
  - odin                ✓ ✓ ✓ ✓ ✓
  - org                 . . . . .
  - pascal              ✓ ✓ ✓ ✓ ✓
  - passwd              ✓ . . . .
  - perl                x . ✓ . ✓
  - php                 ✓ ✓ ✓ ✓ ✓
  - phpdoc              ✓ . . . .
  - pioasm              ✓ . . . ✓
  - po                  ✓ . ✓ . ✓
  - poe_filter          ✓ . ✓ ✓ ✓
  - pony                ✓ ✓ ✓ ✓ ✓
  - prisma              ✓ . . . .
  - proto               x . ✓ . .
  - prql                x . . . ✓
  - pug                 ✓ . . . ✓
  - puppet              x ✓ ✓ ✓ ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - ql                  ✓ ✓ ✓ ✓ ✓
  - qmldir              ✓ . . . ✓
  - qmljs               ✓ . ✓ . .
  - query               ✓ ✓ ✓ ✓ ✓
  - r                   ✓ ✓ . ✓ ✓
  - racket              ✓ . ✓ . ✓
  - rasi                ✓ ✓ ✓ ✓ .
  - regex               ✓ . . . .
  - rego                ✓ . . . ✓
  - rnoweb              ✓ . ✓ . ✓
  - ron                 ✓ ✓ ✓ ✓ ✓
  - rst                 ✓ ✓ . . ✓
  - ruby                ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - scala               ✓ ✓ ✓ . ✓
  - scheme              ✓ . ✓ . ✓
  - scss                ✓ . ✓ ✓ .
  - slint               ✓ . . ✓ .
  - smali               ✓ ✓ ✓ ✓ ✓
  - smithy              ✓ . . . .
  - solidity            ✓ . . . .
  - sparql              ✓ ✓ ✓ ✓ ✓
  - sql                 ✓ . . ✓ ✓
  - squirrel            ✓ ✓ ✓ ✓ ✓
  - starlark            ✓ ✓ ✓ ✓ ✓
  - supercollider       ✓ ✓ ✓ ✓ ✓
  - surface             ✓ . ✓ ✓ ✓
  - svelte              ✓ . ✓ ✓ ✓
  - sxhkdrc             ✓ . ✓ . ✓
  - t32                 x x ✓ ✓ ✓
  - tablegen            ✓ ✓ ✓ ✓ ✓
  - terraform           ✓ . ✓ ✓ ✓
  - thrift              ✓ ✓ ✓ ✓ ✓
  - tiger               ✓ ✓ ✓ ✓ ✓
  - tlaplus             ✓ ✓ ✓ . ✓
  - todotxt             ✓ . . . .
  - toml                ✓ ✓ ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - turtle              ✓ ✓ ✓ ✓ ✓
  - twig                ✓ . . . ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - ungrammar           ✓ ✓ ✓ ✓ ✓
  - usd                 ✓ ✓ ✓ ✓ .
  - uxntal              ✓ ✓ ✓ ✓ ✓
  - v                   x x ✓ x x
  - vala                ✓ . ✓ . .
  - verilog             ✓ ✓ ✓ . ✓
  - vhs                 ✓ . . . .
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - vue                 ✓ . ✓ ✓ ✓
  - wgsl                ✓ . ✓ ✓ .
  - wgsl_bevy           x . ✓ ✓ .
  - yaml                ✓ ✓ ✓ ✓ ✓
  - yang                ✓ . ✓ ✓ ✓
  - yuck                ✓ ✓ ✓ ✓ ✓
  - zig                 ✓ . ✓ ✓ ✓

  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 arduino(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language arduino
  arduino(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language arduino
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3916 for language arduino
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/arduino/highlights.scm"
- ERROR arduino(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language arduino
  arduino(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language arduino
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/folds.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/arduino/folds.scm"
- ERROR arduino(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language arduino
  arduino(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language arduino
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/indents.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/arduino/indents.scm"
- ERROR c(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language c
  c(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language c
- ERROR c(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language c
  c(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language c
- ERROR c(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language c
  c(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language c
- ERROR cmake(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 34 for language cmake
  cmake(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cmake/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 34 for language cmake
- ERROR cmake(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 349 for language cmake
  cmake(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cmake/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 349 for language cmake
- ERROR cpp(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language cpp
  cpp(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language cpp
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3916 for language cpp
- ERROR cpp(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language cpp
  cpp(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language cpp
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/folds.scm"
- ERROR cpp(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language cpp
  cpp(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language cpp
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/indents.scm"
- ERROR cuda(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language cuda
  cuda(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language cuda
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3916 for language cuda
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cuda/highlights.scm"
- ERROR cuda(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language cuda
  cuda(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language cuda
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/folds.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cuda/folds.scm"
- ERROR cuda(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language cuda
  cuda(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language cuda
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/indents.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cuda/indents.scm"
- ERROR glsl(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language glsl
  glsl(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language glsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/glsl/highlights.scm"
- ERROR glsl(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language glsl
  glsl(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language glsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/glsl/folds.scm"
- ERROR glsl(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language glsl
  glsl(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language glsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/glsl/indents.scm"
- ERROR hlsl(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language hlsl
  hlsl(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language hlsl
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3916 for language hlsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/hlsl/highlights.scm"
- ERROR hlsl(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language hlsl
  hlsl(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language hlsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/folds.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/hlsl/folds.scm"
- ERROR hlsl(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language hlsl
  hlsl(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language hlsl
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/cpp/indents.scm"
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/hlsl/indents.scm"
- ERROR ispc(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language ispc
  ispc(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 242 for language ispc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/ispc/highlights.scm"
- ERROR ispc(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language ispc
  ispc(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language ispc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/ispc/folds.scm"
- ERROR ispc(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language ispc
  ispc(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language ispc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/ispc/indents.scm"
- ERROR julia(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 7642 for language julia
  julia(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/julia/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 7642 for language julia
- ERROR julia(injections): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 222 for language julia
  julia(injections) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/julia/injections.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 222 for language julia
- ERROR matlab(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 14 for language matlab
  matlab(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/matlab/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 14 for language matlab
- ERROR matlab(locals): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid field at position 77 for language matlab
  matlab(locals) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/matlab/locals.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid field at position 77 for language matlab
- ERROR matlab(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 134 for language matlab
  matlab(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/matlab/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 134 for language matlab
- ERROR matlab(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1 for language matlab
  matlab(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/matlab/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1 for language matlab
- ERROR objc(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 287 for language objc
  objc(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 287 for language objc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/objc/highlights.scm"
- ERROR objc(folds): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language objc
  objc(folds) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/folds.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 249 for language objc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/objc/folds.scm"
- ERROR objc(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language objc
  objc(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/c/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1109 for language objc
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/objc/indents.scm"
- ERROR perl(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3140 for language perl
  perl(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/perl/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 3140 for language perl
- ERROR proto(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 14 for language proto
  proto(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/proto/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 14 for language proto
- ERROR prql(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 709 for language prql
  prql(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/prql/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 709 for language prql
- ERROR puppet(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 324 for language puppet
  puppet(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/puppet/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 324 for language puppet
- ERROR t32(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 230 for language t32
  t32(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/t32/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 230 for language t32
- ERROR t32(locals): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 317 for language t32
  t32(locals) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/t32/locals.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 317 for language t32
- ERROR v(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 705 for language v
  v(highlights) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/v/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 705 for language v
- ERROR v(locals): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 83 for language v
  v(locals) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/v/locals.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 83 for language v
- ERROR v(indents): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 94 for language v
  v(indents) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/v/indents.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 94 for language v
- ERROR v(injections): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 214 for language v
  v(injections) is concatenated from the following files:
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/v/injections.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 214 for language v
- ERROR wgsl_bevy(highlights): ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 1411 for language wgsl_bevy
  wgsl_bevy(highlights) is concatenated from the following files:
  |    [OK]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/wgsl/highlights.scm"
  | [ERROR]:"/home/sagi/.local/share/nvim/lazy/nvim-treesitter/queries/wgsl_bevy/highlights.scm", failed to load: ...2809/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 21 for language wgsl_bevy

Output of nvim --version

NVIM v0.9.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/nvim/parts/nvim/build/.deps/usr/include/luajit-2.1 -I/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include -I/build/nvim/parts/nvim/build/build/cmake.config -I/build/nvim/parts/nvim/build/src -I/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include -I/build/nvim/parts/nvim/build/.deps/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Additional context

No response

clason commented 1 year ago

This is LSP semantic tokens then. Given the wall of errors in your config, it's virtually impossible to be treesitter.

ghost commented 1 year ago

I fixed the errors manually. It still doesn't work. :(

nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.20.8 (d4c1bf7ce78051b7f4a381d1508d68928512ed5f) (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v18.16.1 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "6.2.0-27-generic",
  sysname = "Linux",
  version = "#28-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 12 22:39:51 UTC 2023"
} ~

Parser/Features         H L F I J
  - ada                 ✓ ✓ ✓ . .
  - agda                ✓ . ✓ . .
  - arduino             ✓ ✓ ✓ ✓ ✓
  - astro               ✓ ✓ ✓ ✓ ✓
  - awk                 ✓ . . . ✓
  - bash                ✓ ✓ ✓ . ✓
  - bass                ✓ ✓ ✓ ✓ ✓
  - beancount           ✓ . ✓ . .
  - bibtex              ✓ . ✓ ✓ .
  - bicep               ✓ ✓ ✓ ✓ ✓
  - blueprint           ✓ . . . .
  - c                   ✓ ✓ ✓ ✓ ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - capnp               ✓ ✓ ✓ ✓ ✓
  - chatito             ✓ ✓ ✓ ✓ ✓
  - clojure             ✓ ✓ ✓ . ✓
  - cmake               ✓ . ✓ ✓ .
  - comment             ✓ . . . .
  - commonlisp          ✓ ✓ ✓ . .
  - cooklang            ✓ . . . .
  - corn                ✓ ✓ ✓ ✓ .
  - cpon                ✓ ✓ ✓ ✓ ✓
  - cpp                 ✓ ✓ ✓ ✓ ✓
  - css                 ✓ . ✓ ✓ ✓
  - cuda                ✓ ✓ ✓ ✓ ✓
  - cue                 ✓ ✓ ✓ ✓ ✓
  - dart                ✓ ✓ ✓ ✓ ✓
  - devicetree          ✓ ✓ ✓ ✓ ✓
  - dhall               ✓ . ✓ . ✓
  - diff                ✓ . . . .
  - dockerfile          ✓ . . . ✓
  - dot                 ✓ . . . ✓
  - ebnf                ✓ . . . .
  - eex                 ✓ . . . ✓
  - elixir              ✓ ✓ ✓ ✓ ✓
  - elm                 ✓ . . . ✓
  - elsa                ✓ ✓ ✓ ✓ ✓
  - elvish              ✓ . . . ✓
  - embedded_template   ✓ . . . ✓
  - erlang              ✓ . ✓ . .
  - fennel              ✓ ✓ ✓ . ✓
  - firrtl              ✓ ✓ ✓ ✓ ✓
  - fish                ✓ ✓ ✓ ✓ ✓
  - foam                ✓ ✓ ✓ ✓ ✓
  - fortran             ✓ . ✓ ✓ .
  - fsh                 ✓ . . . .
  - func                ✓ . . . .
  - fusion              ✓ ✓ ✓ ✓ .
  - gdscript            ✓ ✓ ✓ ✓ ✓
  - git_config          ✓ . . . .
  - git_rebase          ✓ . . . ✓
  - gitattributes       ✓ . . . ✓
  - gitcommit           ✓ . . . ✓
  - gitignore           ✓ . . . .
  - gleam               ✓ ✓ ✓ ✓ ✓
  - glimmer             ✓ ✓ ✓ ✓ .
  - glsl                ✓ ✓ ✓ ✓ ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - godot_resource      ✓ ✓ ✓ . .
  - gomod               ✓ . . . ✓
  - gosum               ✓ . . . .
  - gowork              ✓ . . . ✓
  - graphql             ✓ . . ✓ ✓
  - hack                ✓ . . . .
  - hare                ✓ ✓ ✓ ✓ ✓
  - haskell             ✓ . ✓ . ✓
  - hcl                 ✓ . ✓ ✓ ✓
  - heex                ✓ ✓ ✓ ✓ ✓
  - hjson               ✓ ✓ ✓ ✓ ✓
  - hlsl                ✓ ✓ ✓ ✓ ✓
  - hocon               ✓ . . . ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - htmldjango          ✓ . ✓ ✓ ✓
  - http                ✓ . . . ✓
  - ini                 ✓ . ✓ . .
  - ispc                ✓ ✓ ✓ ✓ ✓
  - janet_simple        ✓ ✓ ✓ . ✓
  - java                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - jq                  ✓ . . . ✓
  - jsdoc               ✓ . . . .
  - json                ✓ ✓ ✓ ✓ .
  - json5               ✓ . . . ✓
  - jsonc               ✓ ✓ ✓ ✓ ✓
  - jsonnet             ✓ . . . .
  - julia               ✓ ✓ ✓ ✓ ✓
  - kdl                 ✓ ✓ ✓ ✓ ✓
  - kotlin              ✓ ✓ ✓ . ✓
  - lalrpop             ✓ ✓ . . ✓
  - latex               ✓ . ✓ . ✓
  - ledger              ✓ . ✓ ✓ ✓
  - llvm                ✓ . . . .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - luadoc              ✓ . . . .
  - luap                ✓ . . . .
  - luau                ✓ ✓ ✓ ✓ ✓
  - m68k                ✓ ✓ ✓ . ✓
  - make                ✓ . ✓ . ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - matlab              ✓ ✓ ✓ ✓ ✓
  - menhir              ✓ . . . ✓
  - mermaid             ✓ . . . .
  - meson               ✓ . ✓ . ✓
  - nickel              ✓ . . ✓ .
  - ninja               ✓ . ✓ ✓ .
  - nix                 ✓ ✓ ✓ . ✓
  - norg                . . . . .
  - objc                ✓ ✓ ✓ ✓ ✓
  - ocaml               ✓ ✓ ✓ ✓ ✓
  - ocaml_interface     ✓ ✓ ✓ ✓ ✓
  - odin                ✓ ✓ ✓ ✓ ✓
  - org                 . . . . .
  - pascal              ✓ ✓ ✓ ✓ ✓
  - passwd              ✓ . . . .
  - perl                ✓ . ✓ . ✓
  - php                 ✓ ✓ ✓ ✓ ✓
  - phpdoc              ✓ . . . .
  - pioasm              ✓ . . . ✓
  - po                  ✓ . ✓ . ✓
  - poe_filter          ✓ . ✓ ✓ ✓
  - pony                ✓ ✓ ✓ ✓ ✓
  - prisma              ✓ . . . .
  - proto               ✓ . ✓ . .
  - prql                ✓ . . . ✓
  - pug                 ✓ . . . ✓
  - puppet              ✓ ✓ ✓ ✓ ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - ql                  ✓ ✓ ✓ ✓ ✓
  - qmldir              ✓ . . . ✓
  - qmljs               ✓ . ✓ . .
  - query               ✓ ✓ ✓ ✓ ✓
  - r                   ✓ ✓ . ✓ ✓
  - racket              ✓ . ✓ . ✓
  - rasi                ✓ ✓ ✓ ✓ .
  - regex               ✓ . . . .
  - rego                ✓ . . . ✓
  - rnoweb              ✓ . ✓ . ✓
  - ron                 ✓ ✓ ✓ ✓ ✓
  - rst                 ✓ ✓ . . ✓
  - ruby                ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - scala               ✓ ✓ ✓ . ✓
  - scheme              ✓ . ✓ . ✓
  - scss                ✓ . ✓ ✓ .
  - slint               ✓ . . ✓ .
  - smali               ✓ ✓ ✓ ✓ ✓
  - smithy              ✓ . . . .
  - solidity            ✓ . . . .
  - sparql              ✓ ✓ ✓ ✓ ✓
  - sql                 ✓ . . ✓ ✓
  - squirrel            ✓ ✓ ✓ ✓ ✓
  - starlark            ✓ ✓ ✓ ✓ ✓
  - supercollider       ✓ ✓ ✓ ✓ ✓
  - surface             ✓ . ✓ ✓ ✓
  - svelte              ✓ . ✓ ✓ ✓
  - sxhkdrc             ✓ . ✓ . ✓
  - t32                 ✓ ✓ ✓ ✓ ✓
  - tablegen            ✓ ✓ ✓ ✓ ✓
  - terraform           ✓ . ✓ ✓ ✓
  - thrift              ✓ ✓ ✓ ✓ ✓
  - tiger               ✓ ✓ ✓ ✓ ✓
  - tlaplus             ✓ ✓ ✓ . ✓
  - todotxt             ✓ . . . .
  - toml                ✓ ✓ ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - turtle              ✓ ✓ ✓ ✓ ✓
  - twig                ✓ . . . ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - ungrammar           ✓ ✓ ✓ ✓ ✓
  - usd                 ✓ ✓ ✓ ✓ .
  - uxntal              ✓ ✓ ✓ ✓ ✓
  - v                   ✓ ✓ ✓ ✓ ✓
  - vala                ✓ . ✓ . .
  - verilog             ✓ ✓ ✓ . ✓
  - vhs                 ✓ . . . .
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - vue                 ✓ . ✓ ✓ ✓
  - wgsl                ✓ . ✓ ✓ .
  - wgsl_bevy           ✓ . ✓ ✓ .
  - yaml                ✓ ✓ ✓ ✓ ✓
  - yang                ✓ . ✓ ✓ ✓
  - yuck                ✓ ✓ ✓ ✓ ✓
  - zig                 ✓ . ✓ ✓ ✓

  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} ~