terrortylor / nvim-comment

A comment toggler for Neovim, written in Lua
MIT License
479 stars 23 forks source link

nvim-comment shows lags when working with ts-context-commentstring #26

Closed qvieth closed 3 years ago

qvieth commented 3 years ago

https://user-images.githubusercontent.com/71810726/126464445-63899653-f860-4676-b432-944d881e3a4e.mp4

while tpope/vim-commentary still works properly in the same situation

gegoune commented 3 years ago

It would be because ts-context-commentstring only triggers on CursorHoldIand CursorHold meaning that if you issue your commenting issue before those events fired you will still have previous value set for commentstring. You could try my PR https://github.com/terrortylor/nvim-comment/pull/23 which allows you to set hook and update commentstring on demand.

terrortylor commented 3 years ago

yeah I'd not say this is a problem with this plugin. @gegoune is working on a PR to give ability to hook third party stuff in, from his readme change explicitly for the plugin you mentioned too.