diff --git a/.config/kak-tree-sitter/config.toml b/.config/kak-tree-sitter/config.toml index b8ca1ad2..738df131 100644 --- a/.config/kak-tree-sitter/config.toml +++ b/.config/kak-tree-sitter/config.toml @@ -12,6 +12,41 @@ groups = [ "markup.list", ] +# sh alias bug workaround +# bash +[language.bash] +aliases = [] + +[grammar.bash.source.git] +url = "https://github.com/tree-sitter/tree-sitter-bash" +pin = "f8fb3274f72a30896075585b32b0c54cad65c086" + +[grammar.bash] +path = "src" +compile = "cc" +compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."] +compile_flags = ["-O3"] +link = "cc" +link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "bash.so"] +link_flags = ["-O3"] + +[language.bash.queries.source.git] +url = "https://github.com/helix-editor/helix" +pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" + +[language.bash.queries] +path = "runtime/queries/bash" + +[language.sh] +grammar = "bash" + +[language.sh.queries.source.git] +url = "https://github.com/helix-editor/helix" +pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb" + +[language.sh.queries] +path = "runtime/queries/bash" + # mermaid [grammar.mermaid.source.git] diff --git a/.config/kak/autoload/filetype/sh.kak b/.config/kak/autoload/filetype/sh.kak index 02fa58b3..e8c3992d 100644 --- a/.config/kak/autoload/filetype/sh.kak +++ b/.config/kak/autoload/filetype/sh.kak @@ -1,6 +1,6 @@ -hook global WinSetOption tree_sitter_lang=sh %{ - set-option window tree_sitter_lang bash -} +# hook global WinSetOption tree_sitter_lang=sh %{ +# set-option window tree_sitter_lang bash +# } hook global WinSetOption filetype=(bash|sh) %{ set-option window formatcmd 'shfmt -i 4 -ln=auto -ci -bn'