-
-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File lookup bug when highlight = { enable = true }
#6187
Comments
I suspect this is because of Edit: I also can't access your reproduce files. The Please add highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = true,
},
Ending note: Please don't just download/install the repo through a plugin, please also read |
Thank you for your quick response! I can confirm - that does indeed fix the issue 🎉
May I ask, where can I find out more information on this? I had checked the help docs for the I think given that information (that I'd love to be able to dig into that more, if you happen to know offhand where to find the information. (If not, that's okay, too).
I completely understand and appreciate your patience. For context - if I remember correctly - I had used this section as a reference for my initial setup of treesitter. Thank you again for your help! |
I just skimmed through |
Note: If using with `vim-rails`, and having `highlight` enabled - it can cause some issues, without the `additional_vim_regex_highlighting` enabled. Reference: nvim-treesitter/nvim-treesitter#6187
Describe the bug
Hi there 👋
Thanks for all the amazing work ya'll do!
I use the
vim-rails
plugin for traversing between files. One of the things that it does is add Rails application paths to thepath
value if using vim/nvim in a Rails project.I noticed, after installing/configuring Treesitter, that the
gf
command broke.Instead of jumping to the expected file, it will raise an
E345
error.I've created a repo with a bare-bones
init.lua
and example Rails application so it's easy to reproduce.You can find it here: https://github.com/thewatts/treesitter-bug, with information on how to reproduce (I'll still add details below).
To Reproduce
In reference to this repo: https://github.com/thewatts/treesitter-bug
init.lua
.app/views/posts/_post.html.erb
gf
Expected behavior
The file,
app/views/posts/_another_partial.html.erb
will be opened.Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
Actual Behavior
You get the error:
E345: Cannot find file "another_parial" in path
If you change the config in
init.lua
to sethighlight
toenable = false
- it works as expected.The text was updated successfully, but these errors were encountered: