Updated kak config

This commit is contained in:
James Dugan 2025-04-26 14:26:50 -06:00
parent a4833bc635
commit c047fe2d55
21 changed files with 766 additions and 62 deletions

View file

@ -0,0 +1,22 @@
hook global WinSetOption filetype=fennel %{
set-option buffer lsp_servers %{
[fennel-ls]
root_globs = [".git", ".hg", "fennel.lua"]
command = "/home/ANT.AMAZON.COM/dugajame/fennel-ls/fennel-ls"
}
lsp-enable-buffer
softtab-enable
}
hook global ModuleLoaded fennel %{
# By default, Kakoune highlights colon strings in the "keyword" face.
# This is incorrect - they should be highlighted as strings.
# So, we override the builtin highlighter with our own.
remove-highlighter shared/fennel/colon-string
add-highlighter shared/fennel/colon-string region '\W\K:[-\w?\\^_!$%&*+./@|<=>]' '(?![-\w?\\^_!$%&*+./@|<=>])' fill string
# Kakoune's default fennel support also doesn't properly highlight values,
# so we patch the lua highlighter in here
remove-highlighter shared/fennel/code/value
add-highlighter shared/fennel/code/value regex \b(false|nil|true|self|[0-9]+(:?\.[0-9])?(:?[eE]-?[0-9]+)?|0x[0-9a-fA-F]+)\b 0:value
}

View file

@ -19,4 +19,6 @@ hook global WinSetOption filetype=go %{
}
lsp-enable-buffer
lsp-semantic-tokens-enable
set-option buffer indentwidth 0 # Use tabs
}

View file

@ -10,4 +10,10 @@ hook global ModuleLoaded kak %@
~ 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}"
$
@

9
.config/kak/filetypes/kdl.kak Executable file
View file

@ -0,0 +1,9 @@
hook global WinSetOption filetype=kdl %{
set-option buffer lsp_servers %{
[kdl-lsp]
root_globs = [".git", ".hg"]
command = "kdl-lsp"
}
lsp-enable-buffer
softtab-enable
}

View file

@ -1,10 +1,18 @@
hook global WinSetOption filetype=lua %{
set-option buffer lsp_servers %{
[lua-language-server]
root_globs = [".luarc.json", ".git", ".hg"]
command = "lua-language-server"
[lua-language-server]
root_globs = [".luarc.json", ".git", ".hg"]
command = "/home/ANT.AMAZON.COM/dugajame/lua-language-server/bin/lua-language-server"
# [emmylua_ls]
# root_globs = [".luarc.json", ".git", ".hg"]
# command = "emmylua_ls"
}
lsp-semantic-tokens-enable
softtab-enable
lsp-enable-buffer
}
hook global ModuleLoaded lua %{
# Support highlighting shebangs
add-highlighter shared/lua/shebang region '^#!' '$' fill comment
}

View file

@ -7,7 +7,7 @@ hook global WinSetOption filetype=python %{
[ruff]
root_globs = ["requirements.txt", "setup.py", "pyrightconfig.json", ".git", ".hg"]
command = "ruff"
args = ["server", "--preview"]
args = ["server"]
}
lsp-enable-buffer
lsp-semantic-tokens-enable

16
.config/kak/filetypes/rust.kak Executable file
View file

@ -0,0 +1,16 @@
hook global WinSetOption filetype=rust %{
set-option buffer lsp_servers %{
# [rust-analyzer]
# root_globs = ["Cargo.toml"]
# single_instance = true
# command = "rust-analyzer"
# [rls]
# root_globs = ["Cargo.toml"]
# command = "rls"
[ra-multiplex]
root_globs = ["Cargo.toml"]
command = "ra-multiplex"
}
lsp-enable-buffer
#lsp-semantic-tokens-enable
}