hook global WinSetOption filetype=kak %{
    softtab-enable
}

hook global ModuleLoaded kak %@
    # toml highlighting for lsp_servers
    require-module toml
    try %~
        add-highlighter shared/kakrc/lsp_servers region -recurse '\{' '\blsp_servers\s+%\{' '\}' ref toml
    ~ catch %$
        echo -debug "Error: kakrc: can't declare additional kakrc highlighters: %val{error}"
    $
    # highlighting for bundle_sh_code
    try %~
        add-highlighter shared/kakrc/bundle_sh_code region -recurse '\{' '\bbundle_sh_code\s+%\{' '\}' ref sh
    ~ catch %$
        echo -debug "Error: kakrc: can't declare additional kakrc highlighters: %val{error}"
    $
@
