JoosepAlviste / nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
MIT License
1.13k stars 34 forks source link

Vue comment not working properly #79

Open shy-robin opened 10 months ago

shy-robin commented 10 months ago

Minimal reproducible full config

-- Your configuration here

Description

I found a weird issue. If a vue file contains a empty <style> block, commenting will not work properly. Like this: image You can see all the comments start with //.

If I remove the empty <style> block or write some styles in the block, it will work fine. Like this: image You can see the <style> block was removed, and the comments in <template> and <script> work fine.

image When I write some styles in <style> block, it works also.

Steps to reproduce

See above

Expected behavior

See above

Actual behavior

See above

Additional context

No response

JoosepAlviste commented 10 months ago

Hey! That's an interesting issue, I tried to reproduce it, but didn't manage to:

https://github.com/JoosepAlviste/nvim-ts-context-commentstring/assets/9450943/a55ff401-7fc2-4050-aa09-604ba98e92f7

I'm using Comment.nvim as my commenting plugin, what are you using?

Could you also add a minimal config where the issue can be reproduced? The example here can be used as a base: https://github.com/JoosepAlviste/nvim-ts-context-commentstring/blob/main/utils/minimal_init.lua

shy-robin commented 10 months ago

@JoosepAlviste Thanks for your reply. I am not using Comment.nvim. I just use the comment feature which is provided by LazyVim and it uses mini.comment. This is the document: https://www.lazyvim.org/plugins/coding#minicomment image