stsewd / tree-sitter-comment

Tree-sitter grammar for comment tags like TODO, FIXME(user).
https://stsewd.dev/tree-sitter-comment/
MIT License
134 stars 9 forks source link

Heavy performance regression for block-comments #17

Closed ttytm closed 1 year ago

ttytm commented 1 year ago

Using the comment parser with block comments results in heavy performance regressions. E.g. when scrolling (<C-d> / <C-u>) the commented section.

I'm ignoring the comment parser in ts_config for the last 6 months or so to not experience this issue. But re-testing it, it's still present.

-- List of parsers to ignore installing
-- "comment" results in major performance issues when using block comments.
-- ignore_install = { "comment" },

It would be great to have it solved and to be able to use this parser unimpaired.

It's probably a global issue, but during a short re-test the regression is definitively present in rust, lua.

stsewd commented 1 year ago

Hi, this is a neovim problem https://github.com/neovim/neovim/issues/22426, also make sure you are using the nightly version of neovim.

ttytm commented 1 year ago

Thanks for the quick response and referencing the related issue, wasn't aware about this!

Yep, nightly all the way :shipit: :+1:

stsewd commented 1 year ago

Closing this, since isn't related to the grammar itself, but neovim.