Closed mawkler closed 3 years ago
Hey @Melkster!
It looks like you're not including nvim-ts-context-commentstring
with Plug
. Another thing that might make it seem like the commentstring
updating is not working, is the high default updatetime
setting.
Could you try a minimal config like this and see if it fixes the problem for you?
call plug#begin('~/.config/nvim/packages/')
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
Plug 'JoosepAlviste/nvim-ts-context-commentstring'
call plug#end()
set updatetime=100 " Or some other small value (Vim default is 4000)
lua << EOF
require('nvim-treesitter.configs').setup {
ensure_installed = 'maintained',
highlight = {
enable = true,
},
context_commentstring = {
enable = true
}
}
EOF
@JoosepAlviste Thank you that solved it. I think it was a combination of me forgetting to include nvim-ts-context-commentstring in my minimal config file and some other plugin causing the autocmd CursorHold
to dissapear in my full config for some reason.
I can't seem to get this plugin to work. This is my minimal config (not sure if nvim-lspconfig is necessary but I included it just in case):
Here's a file that I've tested the plugin on:
On every line in the file,
:echo &commentstring
outputs<!--%s-->
.:TSInstallInfo
says thathtml
,javascript
andcss
are installed.