kakoune: add fossil menu

This commit is contained in:
2026-08-17 20:11:48 +02:00
parent 506abc9f1c
commit 73b8e07bde
+26
View File
@@ -41,6 +41,13 @@ map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
map global -docstring 'REPL send selection' file-mode 'u' ': repl-send-text<ret>'
map global -docstring 'REPL send paragraph' file-mode 'U' ': repl-send-paragraph<ret>'
declare-user-mode fossil-mode
map global -docstring 'Fossil' user 'f' ': enter-user-mode fossil-mode<ret>'
map global -docstring 'Open file' fossil-mode 'a' ': file-open-fossil<ret>'
map global -docstring 'Grep' fossil-mode 'g' ':fossil-grep '
map global -docstring 'ctags project symbols' fossil-mode 'w' ': ctags-project-fossil-symbols<ret>'
declare-user-mode git-mode
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
@@ -80,6 +87,7 @@ map global -docstring 'Code' user 'c' ': enter-user-mode code-mode<ret>'
map global -docstring 'Comment block' code-mode 'b' ': comment-block<ret>'
map global -docstring 'Comment line' code-mode 'l' ': comment-line<ret>'
map global -docstring 'Format buffer' code-mode 'f' ': format-buffer<ret>'
evaluate-commands %sh{
if [ -n "$WAYLAND_DISPLAY" ]; then
@@ -113,6 +121,16 @@ define-command -override file-open-git %{
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
}
define-command -override file-open-fossil %{
prompt -menu -shell-script-candidates %{ fossil ls } 'File (git): ' %{ edit -- %val{text} }
}
define-command -override fossil-grep -params 1- %{
evaluate-commands %sh{
printf '%s ' grep "$@" -- $(fossil ls)
}
}
define-command -override file-open-recent %{
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
}
@@ -164,6 +182,14 @@ define-command -override ctags-project-symbols %{
}
}
define-command -override ctags-project-fossil-symbols %{
prompt -menu -shell-script-candidates %{
fossil ls | xargs wc | awk '$1 > 0 && $3/$1 < 1024 { print $4 }' | xargs ctags -uo - -x | awk -f "$kak_config/scripts/projectsymbols.awk"
} 'Project symbols: ' %{
evaluate-commands %sh{ awk -f "$kak_config/scripts/projectsymbolscmd.awk" # "$kak_text" }
}
}
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
# CHANGE STATUS BAR COLOR IN INSERT MODE