tree-sitter / tree-sitter-c-sharp

C# Grammar for tree-sitter
MIT License
182 stars 51 forks source link

How to correctly install this parser in neovim? #344

Closed sharpchen closed 4 weeks ago

sharpchen commented 1 month ago

I've tried the following step:

>> default          autotag  highlight  illuminate  incremental_selection  indent  playground  query_linter  

csharp              ✗        ✓          ✗           ✗                      ✗       ✗           ✗             

When entering a cs file, I got the error:

``` [Neo-tree ERROR] Error opening file: vim/_editor.lua:0: nvim_exec2()..BufReadPos st Autocommands for "*": Vim(append):Error executing lua callback: ...-neovim-un nwrapped-0.10.0/share/nvim/runtime/filetype.lua:35: Error executing lua: ...-neo ovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:36: nvim_exec2()..BufReadP Post Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error exec cuting lua callback: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua a:112: Failed to load parser: uv_dlsym: no error stack traceback: [C]: in function '_ts_add_language' ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: in function 'a add' ...0/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:111: in function 'n new' ...wrapped-0.10.0/share/nvim/runtime/lua/vim/treesitter.lua:41: in function '_c create_parser' ...wrapped-0.10.0/share/nvim/runtime/lua/vim/treesitter.lua:108: in function 'g get_parser' ...wrapped-0.10.0/share/nvim/runtime/lua/vim/treesitter.lua:416: in function 's start' ...m/lazy/nvim-treesitter/lua/nvim-treesitter/highlight.lua:20: in function 'at ttach' ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:509: in function 'a attach_module' ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:532: in function 'r reattach_module' ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:133: in function <. ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:132> [C]: in function 'nvim_cmd' ...-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:36: in function <.. ..-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:35> [C]: in function 'nvim_buf_call' ...-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:35: in function <.. ..-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:10> [C]: in function 'nvim_exec2' vim/_editor.lua: in function [C]: in function 'pcall' ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/utils/init.lua:741: in function 'o open_file' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:733: in function 'o open' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:755: in function 'o open_with_cmd' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:764: in function 'o open' ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:184: in function <. ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:183> stack traceback: [C]: in function 'nvim_cmd' ...-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:36: in function <.. ..-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:35> [C]: in function 'nvim_buf_call' ...-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:35: in function <.. ..-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:10> [C]: in function 'nvim_exec2' vim/_editor.lua: in function [C]: in function 'pcall' ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/utils/init.lua:741: in function 'o open_file' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:733: in function 'o open' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:755: in function 'o open_with_cmd' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:764: in function 'o open' ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:184: in function <. ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:183> stack traceback: [C]: in function 'nvim_buf_call' ...-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:35: in function <.. ..-neovim-unwrapped-0.10.0/share/nvim/runtime/filetype.lua:10> [C]: in function 'nvim_exec2' vim/_editor.lua: in function [C]: in function 'pcall' ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/utils/init.lua:741: in function 'o open_file' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:733: in function 'o open' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:755: in function 'o open_with_cmd' ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:764: in function 'o open' ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:184: in function <. ...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:183> ```
amaanq commented 4 weeks ago

This is the parser repo, your question doesn't belong here but rather nvim-treesitter.