diff --git a/.config/kak-tree-sitter/config.toml b/.config/kak-tree-sitter/config.toml index 1f437102..ed4720fd 100644 --- a/.config/kak-tree-sitter/config.toml +++ b/.config/kak-tree-sitter/config.toml @@ -12,29 +12,28 @@ groups = [ "markup.list", ] -# [language.sh] -# grammar = "bash" +[language.sh] +grammar = "bash" -# [language.sh.queries] -# source.git.url = "https://github.com/helix-editor/helix" -# source.git.pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" -# path = "runtime/queries/bash" +[language.sh.queries] +source.git.url = "https://github.com/helix-editor/helix" +source.git.pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" +path = "runtime/queries/bash" -# [language.bash] -# aliases = [] -# filetype_hook = false +[language.bash] +aliases = [] -# [grammar.bash.source.git] -# url = "https://github.com/tree-sitter/tree-sitter-bash" -# pin = "f8fb3274f72a30896075585b32b0c54cad65c086" +[grammar.bash.source.git] +url = "https://github.com/tree-sitter/tree-sitter-bash" +pin = "f8fb3274f72a30896075585b32b0c54cad65c086" -# [grammar.bash] -# compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."] -# link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "bash.so"] +[grammar.bash] +compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."] +link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "bash.so"] -# [language.bash.queries.source.git] -# url = "https://github.com/helix-editor/helix" -# pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" +[language.bash.queries.source.git] +url = "https://github.com/helix-editor/helix" +pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" # mermaid diff --git a/.config/kak/autoload/filetype/sh.kak b/.config/kak/autoload/filetype/sh.kak index a6617ba7..643a6207 100644 --- a/.config/kak/autoload/filetype/sh.kak +++ b/.config/kak/autoload/filetype/sh.kak @@ -2,6 +2,8 @@ # set-option window tree_sitter_lang bash # } -# hook global WinSetOption filetype=(bash|sh) %{ -# set-option window formatcmd 'shfmt -i 4 -ln=auto -ci -bn' -# } +hook global WinSetOption filetype=(bash|sh) %{ + set-option window formatcmd 'shfmt -i 4 -ln=auto -ci -bn' + declare-filetype-mode sh + map window sh x ':sh $kak_buffile' -docstring 'execute current shell script' +}