-
-
Notifications
You must be signed in to change notification settings - Fork 67
gqq
on multiline comment results in infinite loop
#218
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
Comments
Workaround for HerringtonDarkholme/yats.vim#218. Also change code to make sure we only trigger filetype once (assuming vim.schedule is FIFO?)
At least for me this is caused by using the neovim-treesitter highlighting. When this is active you can no longer query the current syntax group using There is some discussion around this in nvim-treesitter/nvim-treesitter#1228, it seems we'd need do something custom for treesitter to make this work. In the meantime adding an option to disable the custom formatter as suggested in #247 could be a good workaround. |
Hey 👋 ,
Sample
test.ts
:Issuing
gqq
on the middle (long) line run an infinite loop (CPU core maxed out, "gqq" flashing in the cmd line).Somewhat related to #209 I guess.
I suspect this is a bug in the
Fixedgq
function.Side note: It seems that the
Fixedgq
function actively dismisses formatting multiline comments. But that's precisely why I usegqq
for; my code formatting needs are handled by prettier. I would prefer it for my syntax files to not mess with that.Thanks!
The text was updated successfully, but these errors were encountered: