From b3b04d9efeedb7426532d446577b98a13e9adf40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 16 May 2026 14:11:45 +0200 Subject: [PATCH] kakoune: add peneira fuzzy finder --- kakoune/.config/kak/kakrc | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/kakoune/.config/kak/kakrc b/kakoune/.config/kak/kakrc index 7c9f82d..ec772c0 100644 --- a/kakoune/.config/kak/kakrc +++ b/kakoune/.config/kak/kakrc @@ -3,7 +3,9 @@ set-option global startup_info_version 20260412 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 # LOCAL @@ -164,3 +166,36 @@ bundle easymotion.kak https://git.sr.ht/~voroskoi/easymotion.kak %{ map global -docstring 'easy w' user ': easymotion-w' map global -docstring 'easy b'user ': easymotion-b' } + +# 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' + + declare-user-mode peneira-mode + map global -docstring 'Peneira' user 'd' ': enter-user-mode peneira-mode' + map global -docstring 'Git files' peneira-mode 'a' ': peneira-git-files' + map global -docstring 'Buffers' peneira-mode 'b' ': buffers' + map global -docstring 'Files' peneira-mode 'f' ': peneira-files' + map global -docstring 'Files' peneira-mode 'F' ': peneira-local-files' + map global -docstring 'Lines' peneira-mode 'l' ': peneira-lines' + map global -docstring 'Recent files' peneira-mode 'r' ': peneira-recent-files' +}