kak: switch surround extension

This commit is contained in:
lelgenio 2021-12-10 20:21:28 -03:00
parent be307d1237
commit f733fe22e4
2 changed files with 24 additions and 9 deletions

View File

@ -27,7 +27,28 @@ plug 'alexherbo2/auto-pairs.kak' commit "fd735ec149ef0d9ca5f628a95b1e52858b5afbd
auto-pairs-enable
}
plug 'h-youhei/kakoune-surround'
# plug 'h-youhei/kakoune-surround' %{
# map global user 's' ': enter-user-mode surround<ret>' -docstring 'surround mode'
# map global surround 's' ': surround<ret>' -docstring 'surround'
# map global surround 'c' ': change-surround<ret>' -docstring 'change'
# map global surround 'd' ': delete-surround<ret>' -docstring 'delete'
# map global surround 'x' ': select-surround<ret>' -docstring 'select surround'
# }
plug 'delapouite/kakoune-mirror' %{
# Suggested mapping
map global user "s" ': enter-user-mode mirror<ret>' -docstring 'surround mode'
{%@@ for old, new in [
[ "h", key.left, ],
[ "l", key.right, ],
[ "k", key.up, ],
[ "j", key.down, ],
] @@%}
{%@@ set NEW, OLD = new.upper(), old.upper()@@%}
map global mirror {{@@ new @@}} {{@@ old @@}}
map global mirror {{@@ NEW @@}} {{@@ OLD @@}}
{%@@ endfor @@%}
}
plug 'delapouite/kakoune-palette'
plug 'greenfork/active-window.kak'
@ -39,7 +60,7 @@ plug 'insipx/kak-crosshairs' config %{
plug 'occivink/kakoune-find'
plug 'kak-lsp/kak-lsp' do %{
cargo install --features "no-lto" --locked --force --path .
cargo install --locked --force --path .
} config %{
set global lsp_hover_max_lines 10
# lsp-inlay-diagnostics-enable global

View File

@ -1,7 +1,7 @@
# {{@@ header() @@}}
try %{
declare-user-mode surround
# declare-user-mode surround
declare-user-mode git
declare-user-mode find
}
@ -28,12 +28,6 @@ map global user 'b' ': find_buffer<ret>' -docstring 'switch buffer'
map global user 'l' ': lsp-enable-decals<ret>' -docstring 'LSP enable decals'
map global user 'L' ': lsp-disable-decals<ret>' -docstring 'LSP disable decals'
map global user 's' ': enter-user-mode surround<ret>' -docstring 'surround mode'
map global surround 's' ': surround<ret>' -docstring 'surround'
map global surround 'c' ': change-surround<ret>' -docstring 'change'
map global surround 'd' ': delete-surround<ret>' -docstring 'delete'
map global surround 'x' ': select-surround<ret>' -docstring 'select surround'
map global user 'v' ': enter-user-mode git<ret>' -docstring 'git vcs mode'
map global user 'V' ': enter-user-mode -lock git<ret>' -docstring 'git vcs mode'
map global git 's' ': git status<ret>' -docstring 'status'