-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
nvim-treesitter config for Ruby on Rails is slow #1141
Comments
This has nothing to do with kickstart.nvim - please file a bug with treesitter. |
@feoh I think they're proposing that line should be removed from kickstart.nvim's config |
@rmacklin Thanks for pointing that out. Re-opening. Now who's up for generating a pull request I can review? :) Issues are fine but diffs are spiffier :P |
@jrupinski Please just file a pull request and I'll merge it. This makes sense to me. |
Actually giving this a careful read, I'm unsure whether or not this request actually makes sense. If I understand correctly, the line in question enables fuller syntax highlighting for Ruby regex syntax, at the expense of some startup time. @rmacklin Is that your understanding as well? If so, I don't think we should remove it. I'd entertain a PR that adds a comment citing the fact that this can increase startup time if this feature isn't desired by removing it, but simply making that decision for all Neovim Ruby users feels like the wrong call to me. If folks disagree, please feel free to re-open or better provide a PR and we can hash it out there and then. |
I interpreted "navigation has lag" to mean that e.g. scrolling through was laggy, not that it was just slow to initially start up. But perhaps @jrupinski can clarify. |
Hi, to clarify - I'm not talking start-up, nor does it affect it AFAIK. Navigation has an input delay of sorts, not sure whether it's due to a specific case (eg. moving between different code blocks) or if it lags overall. The change proposed was indeed part of I'll create a PR then 🙂 I should have done that from the start but wanted to verify/discuss it with someone associated with the project. |
Was going to open an issue but found this. I've been experiencing the same navigation lag in large ruby files and found removing |
I don’t edit much Ruby at all so if you’d like, please feel free to submit a full request with this setting removed and I’ll be happy to merge it. |
@JaredSharplin Thinking about this I'm going to propose a PR to remove this setting. Ruby/Rails peeps, if removing this will destroy your world, speak now or forever hold your peace :) |
@jrupinski @JaredSharplin Would this do the trick? Please weigh in. I'd also REALLY appreciate other rubyists commenting on this change. |
There's no solution to this. The "fix" breaks indenting for folks with ruby LSP. Folks who don't use the LSP and want better perf can comment it out in their forks. Closing. |
Describe the bug
Current default config for
nvim-treesitter
is slow on Ruby files (navigation has tiny lag on ~300 line files, probably smaller too)It seems it's due to changes made for Ruby in this commit .
They probably made sense at the time, I don't think they're still required.
After reverting the changes, it seems to work as snappy as expected.
To be exact -
additional_vim_regex_highlighting = { 'ruby' }
seems to be the one causing slowdowns.To Reproduce
kickstart.nvim
.rb
file, navigate around it usinghjkl
(should be couple hundred ms late)init.lua
, revert the changes from commit mentioned , sonvim-treesitter
config looks like this:.rb
file, it should work much snappier.Desktop
macOS 14.6.1 (23G93)
Kitty 0.35.2
Neovim Version
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1725453128
The text was updated successfully, but these errors were encountered: