Open DarkKronicle opened 3 weeks ago
Hello, and thank you for investigating this
I'm not a Vim/Neovim user myself so I didn't test the queries on it, in fact they're not meant to be compatible with Vim at all because the capture group names (@string
, @keyword
, etc) are different across different editors
Is it the only issue you've found with these queries? If so, we could perhaps create a separate vim_queries/
directory in the repo to be used by Vim users, with proper capture groups names and proper regex
That was the only one that seemed to error out, but I noticed if you have a block comment with some keywords in it, it would break the parser.
#|
(defsrc
1 2 3 4
)
|#
(deflayer...)
The defsrc
would be highlighted, and then the rest of the text would not have any highlights. Looking in InspectTree
, a lot of the objects were shown as ERROR
.
Yes, I can reproduce it. Looks like it's not Vim-specific but a problem with block comments parsing. The contents of the comments shouldn't be parsed at all, but for some reason they do :thinking:
Hello! I'm having some difficulty getting the highlighting to work in neovim. I've installed from latest commit, and have moved the
queries/highlights.scm
toqueries/kanata/highlights.scm
in a neovim sourced folder so that treesitter will properly find it.When I open up any kanata file, this message gets spammed several hundred times. The parsing of the tree seems to work though (using![image](https://github.com/postsolar/tree-sitter-kanata/assets/38167691/21e6465e-3898-44b3-ac10-5e3c70b32107)
:InspectTree
)My guess is it is this line. Running
:echo matchstr('@hello', '\@\.\+')
produces the same error.Looking into it a bit, it seems that vim has some weird regex syntax. Using
Seems to fix the issue