From 9f2411496c62f25d882b532b8c8b987ef1ada1be Mon Sep 17 00:00:00 2001 From: Lukasz Pankowski Date: Fri, 17 Jul 2026 00:13:44 +0200 Subject: [PATCH] kakoune: add kak-tree-sitter config for templ --- kakoune/.config/kak-tree-sitter/config.toml | 12 ++++++++++++ kakoune/.config/kak/kakrc | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 kakoune/.config/kak-tree-sitter/config.toml diff --git a/kakoune/.config/kak-tree-sitter/config.toml b/kakoune/.config/kak-tree-sitter/config.toml new file mode 100644 index 0000000..057df7c --- /dev/null +++ b/kakoune/.config/kak-tree-sitter/config.toml @@ -0,0 +1,12 @@ +# templ +[grammar.templ.source.git] +url = "https://github.com/vrischmann/tree-sitter-templ" +pin = "04bae7c82de2fcfec94254fef50f5f1c5924f5f5" + +[grammar.templ] +compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."] +link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "templ.so"] + +[language.templ.queries.source.git] +url = "https://github.com/helix-editor/helix" +pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" diff --git a/kakoune/.config/kak/kakrc b/kakoune/.config/kak/kakrc index fcaa2cb..ba3e46c 100644 --- a/kakoune/.config/kak/kakrc +++ b/kakoune/.config/kak/kakrc @@ -7,6 +7,8 @@ hook global WinCreate .* %{ add-highlighter window/number-lines number-lines -relative -hlcursor } +hook global BufCreate .*\.templ %{ set buffer filetype templ } + # LOCAL nop %sh{