If you place your cursor on <span> and trigger comment toggle gcc results in // %s comment applied instead of expected {/* %s */}.
Turns out nvim_win_get_cursor output and treesitter.get_node's output are off by 1. With this change applied toggling comments on any line for this example file results in the correct comment string applied.
I noticed that toggling comments in jsx nodes had weird behavior
To repro you create a jsx or tsx file with the following content
If you place your cursor on
<span>
and trigger comment togglegcc
results in// %s
comment applied instead of expected{/* %s */}
.Turns out
nvim_win_get_cursor
output andtreesitter.get_node
's output are off by 1. With this change applied toggling comments on any line for this example file results in the correct comment string applied.PS: Thanks for the great plugin!