Closed tek closed 3 years ago
I think that this may be the same bug described here: https://github.com/tree-sitter/tree-sitter/issues/589.
It is fixed in the master branch of Tree-sitter, via https://github.com/tree-sitter/tree-sitter/pull/978.I don't know if Neovim has upgraded to use this version.
Maybe check with the latest version of Tree-sitter if you can reproduce the incorrect row numbers outside of the context of Neovim.
oh wow! I updated tree-sitter a few days ago, will check if that was right before
scratch that, I updated neovim, not tree-sitter
that did indeed fix the problem! :partying_face:
In the wake of neovim merging support for TS 0.19, I am getting back to it.
First thing I noticed is that the line numbers are off – certain scanner results cause the line number to be incremented by two when parsing a newline. I am fiddling around with how these get emitted in the scanner, so far it's still unclear to me what the exact reason is; the only thing I achieved so far is that they are counted even more times.
As far as I can tell, there are these factors:
/\n/
inextras
/\n/
inexternals
@maxbrunsfeld Would greatly appreciate some advice!