You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No it shouldn't, and the readme clearly lists steps to make it work for all popular commenting plugins.
As I understand the author, Defaults work out of the box. means that it works without requiring .setup() call as many plugins do and sets up the default config automatically.
Hey! The set up instructions are a little bit out of date, it looks like. It used to be that Comment.nvim and mini.comment only used the commentstring setting when commenting, but they now have some extra logic. Comment.nvim doesn't use commentstring by default but has its own logic. Mini.nvim uses Treesitter (if available) to get the commentstring of the corresponding filetype, not the buffer's commentstring option that this plugin sets.
This means that it won't work OOTB with these plugins like it does with the native Neovim commenting, for example. I improved the setup docs a little bit here: 6b5f95a. How does it look now?
Also, I was thinking of moving away from the autocmd approach to the approach discussed here: #109. I think that that might make the initial set up of the plugin a bit easier.
Minimal reproducible full config
https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua + add
'JoosepAlviste/nvim-ts-context-commentstring'
insiderequire('lazy').setup({})
Description
The README says that it works ootb, I tried with comment.nvim and mini.comment and it didn't. I had to add this configuration to
mini.comment
:and this to
comment.nvim
:Steps to reproduce
'JoosepAlviste/nvim-ts-context-commentstring'
torequire('lazy').setup({})
.tsx
file just adds the classic js//
Expected behavior
Should work ootb as per the README
Actual behavior
Doesn't work ootb
The text was updated successfully, but these errors were encountered: