You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2023. It is now read-only.
I've noticed some of comments in my vimrc where I subscribe to plugins via vim-plug are not highlighted. I managed to find a minimal scenario where the problem is apparent.
Consider the listing below. If 2nd line starts with a whitespace (empty line is fine) then the comment in the 1st line will not be detected.
Plug 'x/y'"this wont appear as a comment node"if this line starts with a space
As you can see there is 0-length node for comment (comment [1, 1] - [1, 1]) and its on wrong line. Instead a correct node in this scenario should be: comment [0, 11] - [0, 46].
Screenshot:
The text was updated successfully, but these errors were encountered:
So this seems to be pretty strange.
When looking into the issue, it seems that the scanner.c is correctly lexing the comment, but that the issue happens later.
It is also really linked to the space before the comment.
So, the origin of the problem is multiline strings.
For some reason though, tree-sitter does not really like the fact that we call mark_end it seems.
When running the example with gdb, I don't see any problem in the execution. I might open an issue in tree-sitter itself in order to check that.
I've noticed some of comments in my
vimrc
where I subscribe to plugins viavim-plug
are not highlighted. I managed to find a minimal scenario where the problem is apparent.Consider the listing below. If 2nd line starts with a whitespace (empty line is fine) then the comment in the 1st line will not be detected.
Above listing will result in this tree:
As you can see there is 0-length node for comment (
comment [1, 1] - [1, 1]
) and its on wrong line. Instead a correct node in this scenario should be:comment [0, 11] - [0, 46]
.Screenshot:
The text was updated successfully, but these errors were encountered: