Skip to content

Neovim tree sitter support #164

@kmoschcau

Description

@kmoschcau

Hi, Neovim has tree-sitter syntax tree based highlighting as an alternative to regex based highlighting. Enabling it disables the regex based highlighting. You can enable both, but that results in clashing colors from both highlighters. That means vim-css-color's highlighting is also disabled.

So my question is: Would it be possibly to add tree-sitter support for vim-css-color and if that's not feasible, does anyone know of a tree-sitter compatible plugin that does the same?

An alternative that I have considered would be to disable all but vim-css-color regex highlighting and then enable both tree-sitter and the regex highlighting.

As for supporting tree-sitter, here is what I know: One point where one can hook in is in the queries on the already existing syntax tree for a language in a file. That would likely go in the after/queries dir and consist of Scheme files. Though I am not sure if those queries support regex for one and I imagine it would be difficult to do without hard coding colors. (Which would be kinda insane.)
The only other way I could see is to add those things directly to the parser for a given language, but that would then be language specific.

So right now I don't see an easy way to implement this myself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions