Tree-sitter grammar for Kanata #957
postsolar
started this conversation in
Show and tell
Replies: 2 comments
-
If you happen to use Helix, for now you can use it like # add it to your ~/.config/helix/languages.toml
[[language]]
name = "kanata"
scope = "source.kanata"
file-types = [ "kbd" ]
comment-tokens = [ ";;" ]
block-comment-tokens = [
{ start = "#|", end = "|#" }
]
[[grammar]]
name = "kanata"
source = { git = "https://github.com/postsolar/tree-sitter-kanata/", rev = "a6213d06ea6efa432702bbbc6b4c5dcddc21df2a" } After adding the language definition, you'll also need to download the queries file $ mkdir -p ~/.config/helix/runtime/queries/kanata
$ curl -L https://raw.githubusercontent.com/postsolar/tree-sitter-kanata/a6213d06ea6efa432702bbbc6b4c5dcddc21df2a/queries/highlights.scm > ~/.config/helix/runtime/queries/kanata/highlights.scm Neovim folks can consult nvim-treesitter docs |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you very much! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a small grammar for Kanata using tree-sitter, the main use case for them is editor integration (syntax highlighting, etc).
Helix- and Tree-sitter CLI-compatible queries are included
Beta Was this translation helpful? Give feedback.
All reactions