Open arafatamim opened 2 years ago
If you have treesitter playground, you should check the tree but I am pretty sure it is due to some parsing errors (due to this parser and not your file). I don't think the colon are supported in autocmd (again just on this parser) and that's probably the issue with the first file.
The colon seems to be a problem indeed. I am going to add some checks for that and correctly support it.
I have noticed some oddities as well:
Here filetype
breaks the highlighting.
Here colorscheme
breaks the highlighting.
@vigoux Do you think you can add those issues in the project todos ? I really like the parser and want to help and I think having a nice organized list of things would help me a lot to know from where to start.
Yep, I can do that. Could you join the nvim-treesitter Zulip so that we can chat together too @Fymyte ?
For a quick follow up, support for colon before command has been added in commit 3b69c99
Hello,
I've have the same problem when it comes to highlighting:
This should have been fixed in latest master. I'll be adding a few test cases just to be sure.
@BlueDrag0n Most built-in vim commands aren't understood by the parser yet. Most of the tab, buffer, window, and tag related commands aren't understood (like :tabn[ext]
:tabp[revious]
:bn[ext]
:bp[rev]
:sp[lit]
:vert[ical]
etc).
@vigoux Is this something that's on your radar? Do you think the parser should explicitly support every known built-in command or should there be a "fallback" rule that will match :[a-zA-Z0-9]+
and assume there are no args if its not a command explicitly supported?
That's a good question. In an earlier version, the parser parsed unknown commands as some kind of "default" command with "sane" parsing.
Unfortunately, nothing is simple with VimL, and it ended up not working at all in most cases, leading to messed up ASTs in many cases.
That was a long time ago though, so it might be good to reconsider this, so that we make integration of the parser easier for the end users.
vertical
has been added in latest master.
We still miss buffer and tab related commands.
It looks like the syntax highlighting in some parts of the file got messed up. Changing the color scheme doesn't fix it, and I've no idea if this was caused by an update or another plugin. Here are some examples:
I'm running the release Neovim version 0.6.0-1 on Linux.