Open comiluv opened 1 month ago
If I do :TSInstall all
and then :che nvim-treesitter
, report shows 3 errors (out of all 297 parsers)
The following errors have been detected: ~
- ERROR c_sharp(highlights): .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 589:2. Invalid node type "record_struct_declaration":
(record_struct_declaration
^
c_sharp(highlights) is concatenated from the following files:
| [OK]:"C:\Users\username\AppData\Local\nvim-data\lazy\nvim-treesitter\queries\c_sharp\highlights.scm"
| [ERROR]:"C:\Users\username\AppData\Local\nvim-data\lazy\alabaster.nvim\after\queries\c_sharp\highlights.scm", failed to load: .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 12:2. Invalid node type "record_struct_declaration":
(record_struct_declaration
^
- ERROR hare(highlights): .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 278:12. Invalid node type "name":
(name) @AlabasterDefinition))
^
hare(highlights) is concatenated from the following files:
| [OK]:"C:\Users\username\AppData\Local\nvim-data\lazy\nvim-treesitter\queries\hare\highlights.scm"
| [ERROR]:"C:\Users\username\AppData\Local\nvim-data\lazy\alabaster.nvim\after\queries\hare\highlights.scm", failed to load: .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 6:12. Invalid node type "name":
(name) @AlabasterDefinition))
^
- ERROR zig(highlights): .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 287:2. Invalid node type "Decl":
(Decl
^
zig(highlights) is concatenated from the following files:
| [OK]:"C:\Users\username\AppData\Local\nvim-data\lazy\nvim-treesitter\queries\zig\highlights.scm"
| [ERROR]:"C:\Users\username\AppData\Local\nvim-data\lazy\alabaster.nvim\after\queries\zig\highlights.scm", failed to load: .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 4:2. Invalid node type "Decl":
(Decl
^
I don't write C#, @Zorbn can you take a look? I'll update zig
It's been a while since I used Neovim but I guess record_struct_declaration just doesn't exist (anymore?) so it can be removed from the highlights file. Maybe all of those C# *_declarations can be replaced with a single type_declaration.
Description
:checkhealth nvim-treesitter
reports error messages for C# and ZigNeovim version
v0.10.1
How to reproduce the issue
require("lazy.minit").repro({ spec = { { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "csharp", "zig" } }, config = function(, opts) require("nvim-treesitter.configs").setup(opts) end, }, "p00f/alabaster.nvim", }, }) vim.cmd.colorscheme("alabaster")
============================================================================== nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
tree-sitter
found 0.23.0 (12fb31826b8469cc7b9788e72bceee5af1cf0977) (parser generator, only needed for :TSInstallFromGrammar)node
found v20.17.0 (only needed for :TSInstallFromGrammar)git
executable found.cc
executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: cc (Rev1, Built by MSYS2 project) 14.2.0OS Info: { machine = "x86_64", release = "10.0.22631", sysname = "Windows_NT", version = "Windows 11 Pro" } ~
Parser/Features H L F I J
zig x ✓ ✓ ✓ ✓
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 c_sharp(highlights): .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 589:2. Invalid node type "record_struct_declaration": (record_struct_declaration ^
c_sharp(highlights) is concatenated from the following files: | [OK]:"C:\Users\username\OneDrive\dotfiles.repro\data\nvim-data\lazy\nvim-treesitter\queries\c_sharp\highlights.scm" | [ERROR]:"C:\Users\username\OneDrive\dotfiles.repro\data\nvim-data\lazy\alabaster.nvim\after\queries\c_sharp\highlights.scm", failed to load: .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 12:2. Invalid node type "record_struct_declaration": (record_struct_declaration ^
ERROR zig(highlights): .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 287:2. Invalid node type "Decl": (Decl ^
zig(highlights) is concatenated from the following files: | [OK]:"C:\Users\username\OneDrive\dotfiles.repro\data\nvim-data\lazy\nvim-treesitter\queries\zig\highlights.scm" | [ERROR]:"C:\Users\username\OneDrive\dotfiles.repro\data\nvim-data\lazy\alabaster.nvim\after\queries\zig\highlights.scm", failed to load: .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 4:2. Invalid node type "Decl": (Decl ^