First commit
This commit is contained in:
commit
847c9e64c0
51 changed files with 4058 additions and 0 deletions
13
.config/kak/config/local_config.kak
Normal file
13
.config/kak/config/local_config.kak
Normal file
|
@ -0,0 +1,13 @@
|
|||
# local-config
|
||||
evaluate-commands %sh{
|
||||
cwd=$(pwd)
|
||||
while [ $cwd != "/" ]; do
|
||||
path="$cwd/.local.kak"
|
||||
if [ -f $path ]; then
|
||||
printf "%s\n" "source $path"
|
||||
break
|
||||
fi
|
||||
cd ..
|
||||
cwd=$(pwd)
|
||||
done
|
||||
}
|
8
.config/kak/config/mappings.kak
Normal file
8
.config/kak/config/mappings.kak
Normal file
|
@ -0,0 +1,8 @@
|
|||
map global normal <F2> :toggle-whitespace<ret>
|
||||
map global normal <F4> :buffer-switcher<ret>
|
||||
map global normal <F5> :xplr<ret>
|
||||
map global normal <F6> :lazygit<ret>
|
||||
|
||||
map global user 'p' '<a-!>pbpaste<ret>' -docstring 'Paste from clipboard'
|
||||
map global user 'P' '!pbpaste<ret>' -docstring 'Paste from clipboard'
|
||||
map global user 'y' '<a-|>pbcopy<ret>' -docstring 'Yank to clipboard'
|
17
.config/kak/config/options.kak
Normal file
17
.config/kak/config/options.kak
Normal file
|
@ -0,0 +1,17 @@
|
|||
colorscheme everforest-dark-soft
|
||||
|
||||
set-option global ui_options terminal_set_title=no terminal_assistant=cat # The cat is critically important.
|
||||
|
||||
set-option global tabstop 4
|
||||
set-option global indentwidth 4
|
||||
|
||||
add-highlighter global/ show-matching
|
||||
|
||||
declare-option str windowing_placement horizontal
|
||||
# With the way that Kakoune's windowing detection is currently set up, the wezterm module will never be loaded.
|
||||
# So, we need to fix the order in which windowing modules are declared.
|
||||
declare-option str-list windowing_modules 'tmux' 'screen' 'zellij' 'kitty' 'wezterm' 'iterm' 'appleterminal' 'sway' 'wayland' 'x11'
|
||||
|
||||
hook global WinCreate .* %{
|
||||
add-highlighter window/number-lines number-lines -hlcursor
|
||||
}
|
122
.config/kak/config/plugins.kak
Normal file
122
.config/kak/config/plugins.kak
Normal file
|
@ -0,0 +1,122 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue