Compare commits

...

4 Commits

Author SHA1 Message Date
Lukasz Pankowski
d2b7671987 kakoune: add kak-tree-sitter config for odin 2026-07-17 09:45:01 +02:00
Lukasz Pankowski
2820b395c2 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 09:45:01 +02:00
Lukasz Pankowski
c5cd01cbc4 kakoune: add kak-tree-sitter config for templ 2026-07-17 09:45:01 +02:00
Lukasz Pankowski
b4ab641fb7 kakoune: use kak-tree-sitter, update five-colors themes 2026-07-17 09:45:01 +02:00
4 changed files with 145 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
# 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"
# odin
[grammar.odin.source.git]
url = "https://github.com/tree-sitter-grammars/tree-sitter-odin"
pin = "d2ca8efb4487e156a60d5bd6db2598b872629403"
[grammar.odin]
compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."]
link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "odin.so"]
[language.odin.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,55 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2 set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2 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_bold $green2+b
set-face global ts_markup_heading $red3
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_list_numbered $red2
set-face global ts_markup_list_unchecked $red2
set-face global ts_markup_list_unnumbered $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_text $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,55 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2 set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2 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_bold $green2+b
set-face global ts_markup_heading $red3
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_list_numbered $red2
set-face global ts_markup_list_unchecked $red2
set-face global ts_markup_list_unnumbered $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_text $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 .* %{ hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative -hlcursor 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 # LOCAL
@@ -240,6 +242,14 @@ bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
harpoon-add-bindings 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 # LOCAL
define-command set-dark-or-light-colorscheme %{ define-command set-dark-or-light-colorscheme %{