gf doesn't work for partials for me?
thomaswitt opened this issue · comments
Hi everybody,
I have a strange thing, gf works fine for me e.g. when in a Controller, it jumps to the model, when I have a partial, it jumps to the partial.
But when I render something from layout, it doesnt work: <%= render 'layouts/search' %>
gf on layouts/search doesn't work. All I get is E345: Can't fnd file "layouts/search" in path …
Yes, I have seen other issues and therefore it should be working but I don't know why it doesn't. Any idea?
Mine is doing this too, after switching to using LazyVim and updating my config to use lua.
:) I'm still working on figuring it out - but I'll update this here if I have any luck
Update: It looks like nvim-treesitter
is causing things to break on my end.
If I disable it, gf
starts working again.
Agreed -> nvim-treesitter seems to break the gf
command to go find partials. Is there a way to give vim-rails command precedence? I'm assuming something in tree-sitter must also be relying on that same command.
Potentially related: nvim-treesitter/nvim-treesitter#6187
My gf
couldn't find partials either. After adding additional_vim_regex_highlighting = true,
to my treesitter config per this comment, gf
works as expected.