Closed renews closed 5 months ago
Hey :wave:
It looks like rocks.nvim can't find your parser. What'ts the output of
:lua =vim.api.nvim_get_runtime_file("parser/toml.so", true)
?
Also, could you please attach a :Rocks log
?
There should be a parser
symlink in ~/.local/share/nvim/rocks/rocks_rtp
.
Hey š
It looks like rocks.nvim can't find your parser. What'ts the output of
:lua =vim.api.nvim_get_runtime_file("parser/toml.so", true)
?
Also, could you please attach a
:Rocks log
?There should be a
parser
symlink in~/.local/share/nvim/rocks/rocks_rtp
.
Hi šš» ! the result of the command is
:Rocks log
is empty
And the folder
Hey š It looks like rocks.nvim can't find your parser. What'ts the output of
Hi šš» ! the result of the command is
That's very curious. If that command outputs a non-empty table, rocks-treesitter.nvim starts highlighting and doesn't try to install the parser
So unless perhaps you're using an outdated version of this plugin, the only reason it would try to install the parsers has to be that it's returning an empty table when you open the file.
Iām using the latest one, my because Iām on Mac with intel?
Ha, that could indeed be the issue. You're possibly the first mac user using rocks-treesitter.nvim š
The plugin assumes that .dylib
is the extension of the parsers (dynamically linked library), but in fact it's .so
(static library), which is why the check is returning an empty list.
Should be fixed after a :Rocks update
or :Rocks install rocks-treesitter.nvim
(if you don't want to update your other plugins).
It's me again... Looks like that did not solve the issue =/ I tried first with Rocks update, quit reopen nvim and nothing. Tried with the direct install too.
# [plugins]
# nvim-treesitter = "semver_version" # e.g. "1.0.0"
# List of non-Neovim rocks.
# This includes things like `toml` or other lua packages.
[rocks]
# List of Neovim plugins to install alongside their versions.
# If the plugin name contains a dot then you must add quotes to the key name!
[plugins]
"rocks.nvim" = "2.29.0"
"feline.nvim" = "1.6.2"
"rocks-treesitter.nvim" = "scm"
"rocks-git.nvim" = "1.5.1"
"rocks-config.nvim" = "1.6.0"
"telescope.nvim" = "scm"
"mini.nvim" = "scm"
nvim-web-devicons = "0.100"
auto-session = "2.0.1"
# Treesiter parsers
tree-sitter-elixir = "scm"
tree-sitter-vimdoc = "scm"
tree-sitter-toml = "scm"
tree-sitter-lua = "scm"
# Configs for our plugins
# https://github.com/nvim-neorocks/rocks-config.nvim
[config]
plugins_dir = "plugins/"
auto_setup = true
[plugins."gitsigns.nvim"]
git = "lewis6991/gitsigns.nvim"
[plugins."neofusion.nvim"]
git = "diegoulloao/neofusion.nvim"
#### Rocks configs
[treesitter]
auto_highlight = "all"
auto_install = true
Maybe some other part of the Rocks ecosystem ins not handling the macOS correctly? Just asking this because I also had an issue with the self install script of Rocks that was related to its binaries.
š¤ could you please look into rocks_treesiter/highlight.lua
in your rocks-treesitter install, and check if it still searches for a .dylib
parser? (See the link I posted earlier).
Looks correct
You still have the old version installed. The new version doesn't search for dylib on macos: https://github.com/nvim-neorocks/rocks-treesitter.nvim/blob/11662de286de6661aa2a0014253c9521663f73a7/lua/rocks_treesitter/highlight.lua#L13
I guess :Rocks update
didn't update the dev plugin, which may be another bug I need to investigate.
Just ruined a :checkhealth
Maybe this help on your investigation
vim.treesitter: require("vim.treesitter.health").check()
- Nvim runtime ABI version: 14
- OK Parser: lua ABI: 14, path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-lua/parser/lua.so
- ERROR Parser "lua.so" failed to load (path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-lua/parser/lua.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'lua.so' is not a valid language name
- OK Parser: elixir ABI: 14, path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-elixir/parser/elixir.so
- ERROR Parser "elixir.so" failed to load (path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-elixir/parser/elixir.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'elixir.so' is not a valid language name
- OK Parser: toml ABI: 14, path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-toml/parser/toml.so
- ERROR Parser "toml.so" failed to load (path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-toml/parser/toml.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'toml.so' is not a valid language name
- OK Parser: vimdoc ABI: 14, path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-vimdoc/parser/vimdoc.so
- ERROR Parser "vimdoc.so" failed to load (path: /Users/rene/.local/share/nvim/site/pack/luarocks/opt/tree-sitter-vimdoc/parser/vimdoc.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'vimdoc.so' is not a valid language name
- OK Parser: bash ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/bash.so
- OK Parser: c ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/c.so
- OK Parser: lua ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/lua.so
- OK Parser: markdown ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/markdown_inline.so
- OK Parser: python ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/python.so
- OK Parser: query ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/query.so
- OK Parser: vim ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/vim.so
- OK Parser: vimdoc ABI: 14, path: /usr/local/Cellar/neovim/0.10.0/lib/nvim/parser/vimdoc.so
- OK Parser: elixir ABI: 14, path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/elixir.so
- ERROR Parser "elixir.so" failed to load (path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/elixir.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'elixir.so' is not a valid language name
- OK Parser: lua ABI: 14, path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/lua.so
- ERROR Parser "lua.so" failed to load (path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/lua.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'lua.so' is not a valid language name
- OK Parser: toml ABI: 14, path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/toml.so
- ERROR Parser "toml.so" failed to load (path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/toml.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'toml.so' is not a valid language name
- OK Parser: vimdoc ABI: 14, path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/vimdoc.so
- ERROR Parser "vimdoc.so" failed to load (path: /Users/rene/.local/share/nvim/rocks/rocks_rtp/parser/vimdoc.so.dSYM): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:101: 'vimdoc.so' is not a valid language name
For now, try uninstalling and then installing rocks-treesitter.nvim
Reinstalling seems to fix the issue. Thanks and sry for being the bringer of so many issues
Reinstalling seems to fix the issue. Thanks and sry for being the bringer of so many issues
No problem, that's how software evolves š Thanks for reporting š
https://share.cleanshot.com/BhpyrbXq
I recorded the video to make clear what is happening, basically every time I open vim again for that file type, it reinstall the tresitter parser.
Is there something wrong in my config? also in the video, let me know if I have to share something else.
Edit: I removed the
~/.local/share/nvim
and~/.cache/nvim
too and still the same issue.