Comment.nvim icon indicating copy to clipboard operation
Comment.nvim copied to clipboard

Uses `//` as commentstring in html

Open yochem opened this issue 8 months ago • 4 comments

While editing a html file I noticed that gcc inserts // as commentstring (independent of cursor location), even though :echo &commentstring prints <!--%s-->. I also have treesitter installed. Any idea how this is possible?

Nvim version: v0.10.0-dev-743+g9b5f58185-Homebrew Comment Version: 0236521 Config (lazy):

return {
  "numToStr/Comment.nvim",
  opts = {},
  keys = { { "gc", mode = { "n", "v" } } },
}

yochem avatar Oct 10 '23 22:10 yochem

Nightly appears to break this plugin at the moment, specifically in filetypes with different comment strings, like markdown for example:

nvim 9.4.0:

https://github.com/numToStr/Comment.nvim/assets/56943754/dd97347b-c9f9-464b-8391-c6b885218ec2

nightly 10.0:

https://github.com/numToStr/Comment.nvim/assets/56943754/e26159ca-2e08-420e-a6aa-3db658136723

benlubas avatar Oct 13 '23 15:10 benlubas

I tracked my issue down to image.nvim's markdown integration, so I'll move my discussion over there

Weird that it works on stable with image.nvim though.

benlubas avatar Oct 13 '23 17:10 benlubas

+1 currently have the same issue

Edit: Updating to the latest build (NVIM v0.9.4) fixed it.

maxp421 avatar Nov 13 '23 14:11 maxp421

Edit: Updating to the latest build (NVIM v0.9.4) fixed it.

Same issue and it worked for me go back to v0.9.4

OuthBack avatar Dec 16 '23 03:12 OuthBack