terrortylor / nvim-comment

A comment toggler for Neovim, written in Lua
MIT License
479 stars 23 forks source link

Inconsistent commenting #31

Closed numToStr closed 2 years ago

numToStr commented 3 years ago

Thanks for this nice plugin. It surely can replace tcomment which I am currently using.

While using this plugin, I found a weird behavior while commenting. So, If some block of code has an empty line then the commenting doesn't exclude the tab width. The behavior is clearly shown in the video below.

https://user-images.githubusercontent.com/24727447/128667810-736b5014-cf9e-4c87-a247-be0b905be365.mp4

As you can see, the function below has some empty lines thus the weird commenting is happening. But the above function doesn't have empty lines, so the commenting is as expected. I also checked this behavior in typescript and this issue is also there.

cacharle commented 2 years ago

Any update on this?

numToStr commented 2 years ago

I have created https://github.com/numToStr/Comment.nvim if you wanna use it.

cacharle commented 2 years ago

Nice, I'll check it out

alextylor-e2x commented 2 years ago

@cacharle ahh sorry pal, been supper busy, @paegodu did a nice fix for this.