This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/kak/plug.kak

95 lines
3.0 KiB
Plaintext
Raw Normal View History

2020-11-14 20:53:21 +01:00
# {{@@ header() @@}}
2021-02-14 19:20:06 +01:00
nop %sh{
2021-04-05 07:05:59 +02:00
PLUG_DIR="${HOME}/.cache/kakoune_plugins"
2021-10-28 18:44:47 +02:00
REPO="https://github.com/andreyorst/plug.kak.git"
2021-02-14 19:20:06 +01:00
2021-04-05 07:05:59 +02:00
mkdir -p "$PLUG_DIR"
2020-11-14 20:53:21 +01:00
2021-04-05 07:05:59 +02:00
test -d "${PLUG_DIR}/plug.kak" ||
git clone "$REPO" "${PLUG_DIR}/plug.kak"
2021-02-14 19:20:06 +01:00
}
2021-02-17 01:22:05 +01:00
source %sh{ echo "${HOME}/.cache/kakoune_plugins/plug.kak/rc/plug.kak" }
2020-11-15 00:06:22 +01:00
2021-10-28 18:44:47 +02:00
plug "andreyorst/plug.kak" noload config %{
2021-04-05 07:05:59 +02:00
# Auto install every pluging
set-option global plug_always_ensure true
set-option global plug_install_dir %sh{ echo "${HOME}/.cache/kakoune_plugins" }
2021-02-17 01:22:05 +01:00
}
2021-02-14 19:20:06 +01:00
2021-04-17 08:10:45 +02:00
plug 'eraserhd/kak-ansi'
plug 'alexherbo2/auto-pairs.kak' config %{
enable-auto-pairs
2021-02-17 01:22:05 +01:00
}
2022-02-06 05:02:52 +01:00
plug 'lelgenio/kakoune-mirror-colemak' config %{
map global user "s" ': enter-user-mode mirror<ret>'
2021-12-11 00:21:28 +01:00
}
2021-02-14 19:20:06 +01:00
2021-02-17 01:22:05 +01:00
plug 'delapouite/kakoune-palette'
2021-09-17 00:14:40 +02:00
plug 'greenfork/active-window.kak'
2022-02-06 05:26:45 +01:00
plug 'lelgenio/kak-crosshairs' config %{
crosshairs-enable
2021-02-17 01:22:05 +01:00
}
2021-02-14 19:20:06 +01:00
2021-04-05 07:05:59 +02:00
# Search and replace, for every buffer
2022-02-12 05:39:20 +01:00
plug "natasky/kakoune-multi-file"
2021-04-05 07:05:59 +02:00
2022-02-17 01:51:59 +01:00
plug "lelgenio/kakoune-colemak-neio"
2022-05-19 14:29:01 +02:00
plug 'kak-lsp/kak-lsp' do %{
2021-12-11 00:21:28 +01:00
cargo install --locked --force --path .
2021-10-28 18:44:47 +02:00
} config %{
map global normal <F2> ': lsp-rename-prompt<ret>'
2021-04-05 07:05:59 +02:00
set global lsp_hover_max_lines 10
2021-09-17 00:14:40 +02:00
set global lsp_auto_highlight_references true
set global lsp_inlay_diagnostic_sign "●"
set global lsp_diagnostic_line_error_sign "●"
hook global BufCreate .* %{try lsp-enable}
2022-06-21 21:46:54 +02:00
define-command -override -hidden lsp-next-placeholder-bind %{
map global normal <tab> ': try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
map global insert <tab> '<a-;>: try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
}
lsp-next-placeholder-bind
map global insert <c-o> "<esc>: lsp-code-action-sync Fill<ret>"
define-command -override -hidden lsp-enable-decals %{
lsp-inlay-diagnostics-enable global
lsp-inlay-hints-enable global
}
define-command -override -hidden lsp-disable-decals %{
lsp-inlay-diagnostics-disable global
lsp-inlay-hints-disable global
}
2022-04-09 05:02:59 +02:00
lsp-enable-decals
hook global ModeChange '.*:insert:normal' %{lsp-enable-decals}
hook global ModeChange '.*:normal:insert' %{lsp-disable-decals}
2021-03-05 01:44:07 +01:00
2021-04-05 07:05:59 +02:00
hook global WinSetOption filetype=(c|cpp|rust) %{
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
}
}
2022-05-19 04:10:14 +02:00
declare-option -hidden str modeline_progress ""
define-command -hidden -params 6 -override lsp-handle-progress %{
set global modeline_progress %sh{
if ! "$6"; then
echo "$2${5:+" ($5%)"}${4:+": $4"}"
fi
}
}
set global modelinefmt "%%opt{modeline_progress} %opt{modelinefmt}"
2020-11-15 00:06:22 +01:00
}
2021-02-14 19:20:06 +01:00