dippin-dotfiles/.config/kak/config/plugins.kak
2025-02-04 21:06:01 -07:00

122 lines
4.4 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

source "%val{config}/bundle/kak-bundle/rc/kak-bundle.kak"
bundle-noload kak-bundle "ln -sf ~/workspace/kak-bundle/"
bundle kakoune-lsp "https://github.com/kakoune-lsp/kakoune-lsp" %{
set-option global lsp_diagnostic_line_error_sign 
set-option global lsp_diagnostic_line_hint_sign ?
set-option global lsp_diagnostic_line_info_sign
set-option global lsp_diagnostic_line_warning_sign 
# kakoune-lsp doesn't have a command to enable auto-hover per buffer,
# only supporting enabling auto-hover globally,
# which causes issues in filetypes that don't have lsp set up.
# So, we need to define one ourselves.
define-command lsp-auto-hover-enable-buffer %{
remove-hooks buffer lsp-auto-hover
hook -group lsp-auto-hover buffer NormalIdle .* %{ lsp-check-auto-hover lsp-hover }
}
# Convenience commands for enabling lsp features
define-command lsp-semantic-tokens-enable %{
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
hook -once -always window WinSetOption filetype=.* %{
remove-hooks window semantic-tokens
}
}
define-command lsp-enable-buffer %{
lsp-enable-window
lsp-auto-hover-enable-buffer
lsp-inlay-diagnostics-enable buffer
lsp-inlay-hints-enable buffer
}
# We want to be explicit about lsp server settings per filetype
# So, we are disabling the default lsp server hooks
remove-hooks global lsp-filetype-.*
}
bundle-install-hook kakoune-lsp %{
cargo install --locked --force --path .
}
bundle-noload everforest.kak "ln -sf ~/workspace/everforest.kak/"
bundle-install-hook everforest.kak %{
mkdir -p "${kak_config}/colors"
ln -sf "${kak_opt_bundle_path}/everforest.kak" "${kak_config}/colors/"
}
bundle-cleaner everforest.kak %{
rm "${kak_config}/colors/everforest.kak"
}
bundle luar "https://github.com/gustavo-hms/luar" %@
require-module luar
# Luar's highlighters are very subtly broken so we need to replace them
# TODO: submit a PR to luar with these fixes.
remove-highlighter shared/kakrc/lua1
remove-highlighter shared/kakrc/lua2
remove-highlighter shared/kakrc/lua3
remove-highlighter shared/kakrc/lua4
add-highlighter shared/kakrc/lua1 region -recurse '\{' '(^|\h)lua\s(([\s{}\w%/$-|''"])* )?%\{\K' '\}' ref lua
add-highlighter shared/kakrc/lua2 region -recurse '\(' '(^|\h)lua\s(([\s{}\w%/$-|''"])* )?%\(\K' '\)' ref lua
add-highlighter shared/kakrc/lua3 region -recurse '\[' '(^|\h)lua\s(([\s{}\w%/$-|''"])* )?%\[\K' '\]' ref lua
add-highlighter shared/kakrc/lua4 region -recurse '<' '(^|\h)lua\s(([\s{}\w%/$-|''"])* )?%<\K' '>' ref lua
@
bundle kakoune-buffer-switcher "https://github.com/occivink/kakoune-buffer-switcher" %{
# Make the current buffer more visible
set-face global BufferSwitcherCurrent value
}
bundle kakoune-focus "https://github.com/caksoylar/kakoune-focus" %{
map global user <space> ':focus-toggle<ret>' -docstring "toggle selections focus"
}
bundle kakship https://github.com/eburghar/kakship %{
kakship-enable
}
bundle-install-hook kakship %{
cargo install --force --path . --root ~/.local
[ ! -e $kak_config/starship.toml ] && cp starship.toml $kak_config/
}
bundle-cleaner kakship %{
rm ~/.local/bin/kakship
}
bundle popup.kak https://github.com/enricozb/popup.kak
bundle-install-hook popup.kak %{
cargo install --force --path .
}
bundle-cleaner popup.kak %{
cargo uninstall kak-popup
}
bundle-customload kak-tree-sitter https://git.sr.ht/~hadronized/kak-tree-sitter %{
evaluate-commands %sh{ kak-tree-sitter -dks --init $kak_session }
}
bundle-install-hook kak-tree-sitter %{
cargo install --force --path ./kak-tree-sitter
cargo install --force --path ./ktsctl
}
bundle-cleaner kak-tree-sitter %{
cargo uninstall kak-tree-sitter
cargo uninstall ktsctl
}
bundle-noload kakeidoscope "git clone --recurse-submodules https://git.sr.ht/~orchid/kakeidoscope"
bundle-install-hook kakeidoscope %{
cd src
make
mv kakeidoscope ~/.local/bin/
}
bundle-cleaner kakeidoscope %{
rm ~/.local/bin/kakeidoscope
}
bundle-updater kakeidoscope %{
git pull --recurse-submodules
}
bundle peneira https://github.com/gustavo-hms/peneira %{
require-module peneira
}