kakoune: add peneira fuzzy finder

This commit is contained in:
2026-05-16 14:11:45 +02:00
parent 7f1fea5a8c
commit b3b04d9efe

View File

@@ -3,7 +3,9 @@
set-option global startup_info_version 20260412 set-option global startup_info_version 20260412
set-option global ui_options terminal_assistant=none set-option global ui_options terminal_assistant=none
add-highlighter global/ number-lines -relative hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative
}
add-highlighter global/ show-matching add-highlighter global/ show-matching
# LOCAL # LOCAL
@@ -164,3 +166,36 @@ bundle easymotion.kak https://git.sr.ht/~voroskoi/easymotion.kak %{
map global -docstring 'easy w' user <w> ': easymotion-w<ret>' map global -docstring 'easy w' user <w> ': easymotion-w<ret>'
map global -docstring 'easy b'user <b> ': easymotion-b<ret>' map global -docstring 'easy b'user <b> ': easymotion-b<ret>'
} }
# PENEIRA
bundle 'luar' 'https://github.com/gustavo-hms/luar' %{
require-module luar
}
bundle 'peneira' 'https://github.com/gustavo-hms/peneira' %{
require-module peneira
define-command buffers %{
peneira 'buffers: ' %{ eval "printf '%s\n' $kak_quoted_buflist" } %{
buffer %arg{1}
}
}
define-command peneira-git-files %{
peneira 'git files: ' %{ git ls-files } %{ e %arg{1} }
}
define-command peneira-recent-files %{
peneira 'mru files: ' %{ cat ~/.cache/kak-mru } %{ e %arg{1} }
}
map global -docstring 'Buffer' user ' ' ': buffers<ret>'
declare-user-mode peneira-mode
map global -docstring 'Peneira' user 'd' ': enter-user-mode peneira-mode<ret>'
map global -docstring 'Git files' peneira-mode 'a' ': peneira-git-files<ret>'
map global -docstring 'Buffers' peneira-mode 'b' ': buffers<ret>'
map global -docstring 'Files' peneira-mode 'f' ': peneira-files<ret>'
map global -docstring 'Files' peneira-mode 'F' ': peneira-local-files<ret>'
map global -docstring 'Lines' peneira-mode 'l' ': peneira-lines<ret>'
map global -docstring 'Recent files' peneira-mode 'r' ': peneira-recent-files<ret>'
}