Compare commits

..

3 Commits

Author SHA1 Message Date
Lukasz Pankowski
1dca5cf356 kakoune: add kak-tree-sitter config for gotmpl
modify file
~/.local/share/kak-tree-sitter/queries/gotmpl/7275b7f85014aad7e15d4987ec4f2249572eecfb/injections.scm
adding:
((text) @injection.content
 (#set! injection.language "html")
 (#set! injection.combined))
2026-07-17 00:48:15 +02:00
Lukasz Pankowski
9f2411496c kakoune: add kak-tree-sitter config for templ 2026-07-17 00:13:44 +02:00
Lukasz Pankowski
ee28fdc812 kakoune: use kak-tree-sitter, update five-colors themes 2026-07-16 23:05:50 +02:00
4 changed files with 126 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
# gotmpl
[grammar.gotmpl.source.git]
url = "https://github.com/ngalaiko/tree-sitter-go-template"
pin = "aa71f63de226c5592dfbfc1f29949522d7c95fac"
[language.gotmpl.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb"
# 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"

View File

@@ -121,5 +121,52 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2
# kak-tree-sitter
set-face global ts_attribute $green3
set-face global ts_comment $gray
set-face global ts_constant $violet2
set-face global ts_conceal $red1
set-face global ts_constructor $red1
set-face global ts_diff_plus $green2
set-face global ts_diff_minus $red2
set-face global ts_diff_delta $blue2
set-face global ts_error $red2
set-face global ts_function $blue2
set-face global ts_hint $green2
set-face global ts_info $blue2
set-face global ts_keyword $violet3
set-face global ts_label $red1
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_numbered $red2
set-face global ts_markup_unchecked $red2
set-face global ts_markup_link_label $green2
set-face global ts_markup_link_url $blue2
set-face global ts_markup_link_uri $blue2
set-face global ts_markup_link_uri $red1
set-face global ts_markup_quote $blue3
set-face global ts_markup_raw $yellow2
set-face global ts_markup_strikethrough $red2+s
set-face global ts_namespace $green3
set-face global ts_operator $red2
set-face global ts_property $green3
set-face global ts_punctuation $red3
set-face global ts_special $red3
set-face global ts_spell $red1+c
set-face global ts_string $yellow2
set-face global ts_string_regex $yellow1+b
set-face global ts_string_regexp $yellow1+b
set-face global ts_string_escape $yellow1+b
set-face global ts_string_special $yellow1+b
set-face global ts_string_symbol $yellow1+b
set-face global ts_tag $green2
set-face global ts_tag_error $red2+c
set-face global ts_text $red1
set-face global ts_text_title $red3
set-face global ts_type $green2
set-face global ts_variable $blue3
set-face global ts_warning $yellow2+c
"
}

View File

@@ -121,5 +121,52 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2
# kak-tree-sitter
set-face global ts_attribute $green3
set-face global ts_comment $gray
set-face global ts_constant $violet2
set-face global ts_conceal $red1
set-face global ts_constructor $red1
set-face global ts_diff_plus $green2
set-face global ts_diff_minus $red2
set-face global ts_diff_delta $blue2
set-face global ts_error $red2
set-face global ts_function $blue2
set-face global ts_hint $green2
set-face global ts_info $blue2
set-face global ts_keyword $violet3
set-face global ts_label $red1
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_numbered $red2
set-face global ts_markup_unchecked $red2
set-face global ts_markup_link_label $green2
set-face global ts_markup_link_url $blue2
set-face global ts_markup_link_uri $blue2
set-face global ts_markup_link_uri $red1
set-face global ts_markup_quote $blue3
set-face global ts_markup_raw $yellow2
set-face global ts_markup_strikethrough $red2+s
set-face global ts_namespace $green3
set-face global ts_operator $red2
set-face global ts_property $green3
set-face global ts_punctuation $red3
set-face global ts_special $red3
set-face global ts_spell $red1+c
set-face global ts_string $yellow2
set-face global ts_string_regex $yellow1+b
set-face global ts_string_regexp $yellow1+b
set-face global ts_string_escape $yellow1+b
set-face global ts_string_special $yellow1+b
set-face global ts_string_symbol $yellow1+b
set-face global ts_tag $green2
set-face global ts_tag_error $red2+c
set-face global ts_text $red1
set-face global ts_text_title $red3
set-face global ts_type $green2
set-face global ts_variable $blue3
set-face global ts_warning $yellow2+c
"
}

View File

@@ -6,7 +6,9 @@ set-option global ui_options terminal_assistant=none
hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative -hlcursor
}
add-highlighter global/ show-matching
hook global BufCreate .*\.templ %{ set buffer filetype templ }
hook global BufCreate .*\.html.tmpl %{ set buffer filetype gotmpl }
# LOCAL
@@ -240,6 +242,14 @@ bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
harpoon-add-bindings
}
# TREE SITTER
eval %sh{ kak-tree-sitter -dks --init $kak_session }
define-command -override tree-sitter-user-after-highlighter %{
add-highlighter -override buffer/show-matching show-matching
}
# LOCAL
define-command set-dark-or-light-colorscheme %{