kak-tree-sitter
kak-tree-sitter copied to clipboard
Can't get Astro queries working
Specifically the HTML/JSX variant under their ---
fold isn't highlighted.
Config
[language.astro.grammar.source.git]
url = "https://github.com/virchau13/tree-sitter-astro"
pin = "dfa0893bdc4bdfada102043404758c66e3580568"
[language.astro.grammar]
path = "src"
compile = "cc"
compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."]
compile_flags = ["-O3"]
link = "cc"
link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "astro.so"]
link_flags = ["-O3"]
[language.astro.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "be307a420480178c1bc443992c8336f6471b8b7b"
[language.astro.queries]
path = "runtime/queries/astro"
Don't forget to add the astro
ft:
hook global BufCreate .*\.astro %{
set-option buffer filetype astro
}
Log
tree-sitter 2024-04-23T02:12:55.495961204+00:00 (kak_tree_sitter::server) [INFO]: running in /run/user/1000/kak-tree-sitter
tree-sitter 2024-04-23T02:12:55.496019041+00:00 (kak_tree_sitter::server) [DEBUG]: checking whether PID 15337 is still up…
tree-sitter 2024-04-23T02:12:55.532399277+00:00 (kak_tree_sitter::server) [DEBUG]: kak-tree-sitter already running; not starting a new server
...the rest is LSP log..
Extra info
All the astro
files I open look like this:
It’s not probably not requesting highlighting correctly. Once you have opened the buffer, try this:
:set-option buffer kts_lang astro
:kak-tree-sitter-req-enable
If that works, then it’s a problem with the way we enable highlighting. There are issues in #260 (and I have noticed some annoying regressions when opening a file like kak stuff.rs
).
:set-option buffer kts_lang astro :kak-tree-sitter-req-enable
I did that, and it's still the same, only highlighting in the JS/TS part, and the HTML/JSX part is not highlighted. Maybe I need more grammars?
:set-option buffer kts_lang astro :kak-tree-sitter-req-enable
I did that, and it's still the same, only highlighting in the JS/TS part, and the HTML/JSX part is not highlighted. Maybe I need more grammars?
Have you followed this?