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

90 lines
2.9 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'
2021-02-17 01:22:05 +01:00
plug 'alexherbo2/prelude.kak'
plug 'alexherbo2/auto-pairs.kak' commit "fd735ec149ef0d9ca5f628a95b1e52858b5afbdc" config %{
2021-04-05 07:05:59 +02:00
require-module 'prelude'
require-module 'auto-pairs'
auto-pairs-enable
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 'occivink/kakoune-find'
plug "natasky/kakoune-multi-file"
2021-04-05 07:05:59 +02:00
2021-10-28 18:44:47 +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 %{
2021-04-05 07:05:59 +02:00
set global lsp_hover_max_lines 10
2021-10-28 18:44:47 +02:00
# lsp-inlay-diagnostics-enable global
2021-09-17 00:14:40 +02:00
set global lsp_auto_highlight_references true
2021-12-08 00:57:06 +01:00
# set global lsp_inlay_diagnostic_sign "●"
# set global lsp_diagnostic_line_error_sign "●"
2021-03-05 01:44:07 +01:00
2021-10-28 18:44:47 +02:00
# hook global BufCreate .* %{try lsp-enable}
2021-03-05 01:44:07 +01:00
2021-10-28 18:44:47 +02:00
# hook global -group rust-inlay-hints-auto WinSetOption filetype=rust %{
# hook window -group rust-inlay-hints BufReload .* rust-analyzer-inlay-hints
# hook window -group rust-inlay-hints NormalIdle .* rust-analyzer-inlay-hints
# hook window -group rust-inlay-hints InsertIdle .* rust-analyzer-inlay-hints
# hook -once -always window WinSetOption filetype=.* %{
# remove-hooks window rust-inlay-hints
# }
# }
2021-10-28 18:44:47 +02:00
# define-command -override -hidden lsp-enable-decals %{
# lsp-inlay-diagnostics-enable global
# try %{
# add-highlighter global/rust_analyzer_inlay_hints replace-ranges rust_analyzer_inlay_hints
# }
# }
2021-10-28 18:44:47 +02:00
# define-command -override -hidden lsp-disable-decals %{
# lsp-inlay-diagnostics-disable global
# remove-highlighter global/rust_analyzer_inlay_hints
# }
2021-03-05 01:44:07 +01:00
2021-10-28 18:44:47 +02:00
# 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) %{
2021-10-28 18:44:47 +02:00
lsp-enable
2021-04-05 07:05:59 +02:00
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
}
}
2020-11-15 00:06:22 +01:00
}
2021-02-14 19:20:06 +01:00