Closed AgentCosmic closed 4 months ago
This plugin does not change the commentstring
, but will still honor any options set.
Did you actually try commenting?
Are you sure the plugin is loaded?
Yes I tried commenting. I used the repro.lua
to test it with the native comment plugin that came with nvim v0.10. Here's a screenshot as proof. You can see I commented the code.
I'm confused by the purpose of this plugin. I see the project description: "Easily override the comment string for a given treesitter language". For example, I see that javascript is using // %s
. But when I comment it doesn't use it. So what is this plugin supposed to do if I can't use the commenstring?
The repro does not call setup, so the plugin won't work.
You need to add opts = {}
to it's plugin spec, or call setup()
explicitely
That seems to fix it. Thanks!
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068
Operating system/version
Debian 12
Describe the bug
The
commentstring
is being set by ftplugin instead of this plugin. When I run:verbose set commenstring
I get this:When I open the file, it's the built-in ftplugin https://github.com/vim/vim/blob/master/runtime/ftplugin/javascript.vim
Sometimes is works fine but sometimes it doesn't.
Steps To Reproduce
.js
file//%s
instead of// %s
as defined by this plugin.Expected Behavior
The plugin
commentstring
should be used at all times.Repro