|
|
@@ -10,8 +10,6 @@ hook global WinCreate .* %{
|
|
|
|
hook global BufCreate .*\.templ %{ set buffer filetype templ }
|
|
|
|
hook global BufCreate .*\.templ %{ set buffer filetype templ }
|
|
|
|
hook global BufCreate .*\.html.tmpl %{ set buffer filetype gotmpl }
|
|
|
|
hook global BufCreate .*\.html.tmpl %{ set buffer filetype gotmpl }
|
|
|
|
|
|
|
|
|
|
|
|
hook global WinCreate ^[^*]+$ %{editorconfig-load}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# LOCAL
|
|
|
|
# LOCAL
|
|
|
|
|
|
|
|
|
|
|
|
nop %sh{
|
|
|
|
nop %sh{
|
|
|
@@ -38,15 +36,6 @@ map global -docstring 'Grep previous match' file-mode 'p' ': grep-prev-match<ret
|
|
|
|
map global -docstring 'Grep current file' file-mode 'l' ':grep-file '
|
|
|
|
map global -docstring 'Grep current file' file-mode 'l' ':grep-file '
|
|
|
|
map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>'
|
|
|
|
map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>'
|
|
|
|
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
|
|
|
|
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
|
|
|
|
declare-user-mode git-mode
|
|
|
|
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
|
|
|
|
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
|
|
|
@@ -87,7 +76,6 @@ 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 block' code-mode 'b' ': comment-block<ret>'
|
|
|
|
map global -docstring 'Comment line' code-mode 'l' ': comment-line<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{
|
|
|
|
evaluate-commands %sh{
|
|
|
|
if [ -n "$WAYLAND_DISPLAY" ]; then
|
|
|
|
if [ -n "$WAYLAND_DISPLAY" ]; then
|
|
|
@@ -121,16 +109,6 @@ define-command -override file-open-git %{
|
|
|
|
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
|
|
|
|
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 (fossil): ' %{ edit -- %val{text} }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define-command -override fossil-grep -params 1- %{
|
|
|
|
|
|
|
|
evaluate-commands %sh{
|
|
|
|
|
|
|
|
printf '%s ' grep "$@" -- $(fossil ls)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define-command -override file-open-recent %{
|
|
|
|
define-command -override file-open-recent %{
|
|
|
|
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
|
|
|
|
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -147,10 +125,6 @@ define-command -override open-create-in-dir %{
|
|
|
|
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
|
|
|
|
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
define-command -override repl-send-paragraph %{
|
|
|
|
|
|
|
|
execute-keys -draft '<a-i>p: repl-send-text<ret>'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define-command git-log-show-current-commit %{
|
|
|
|
define-command git-log-show-current-commit %{
|
|
|
|
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
|
|
|
|
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
|
|
|
|
git show %val{selection}
|
|
|
|
git show %val{selection}
|
|
|
@@ -182,35 +156,18 @@ 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'
|
|
|
|
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
|
|
|
|
|
|
|
|
|
|
|
|
# CHANGE CURSOR IN INSERT MODE
|
|
|
|
# CHANGE STATUS BAR COLOR IN INSERT MODE
|
|
|
|
|
|
|
|
|
|
|
|
hook global ModeChange (push|pop):.*:insert %{
|
|
|
|
hook global ModeChange push:.*:insert %{
|
|
|
|
set-face window PrimarySelection rgb:000000,green+F
|
|
|
|
set-face window StatusLine 'default,rgb:04785d'
|
|
|
|
set-face window SecondarySelection rgb:000000,blue+F
|
|
|
|
set-option window idle_timeout 500
|
|
|
|
set-face window PrimaryCursor rgb:000000,bright-green+bF
|
|
|
|
|
|
|
|
set-face window SecondaryCursor rgb:000000,bright-blue+bF
|
|
|
|
|
|
|
|
set-face window PrimaryCursorEol rgb:000000,bright-red+bF
|
|
|
|
|
|
|
|
set-face window SecondaryCursorEol rgb:000000,bright-yellow+bF
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Undo colour changes when we leave insert mode.
|
|
|
|
hook global ModeChange pop:insert:.* %{
|
|
|
|
hook global ModeChange (push|pop):insert:.* %{
|
|
|
|
unset-face window StatusLine
|
|
|
|
unset-face window PrimarySelection
|
|
|
|
unset-option window idle_timeout
|
|
|
|
unset-face window SecondarySelection
|
|
|
|
|
|
|
|
unset-face window PrimaryCursor
|
|
|
|
|
|
|
|
unset-face window SecondaryCursor
|
|
|
|
|
|
|
|
unset-face window PrimaryCursorEol
|
|
|
|
|
|
|
|
unset-face window SecondaryCursorEol
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# ODIN
|
|
|
|
# ODIN
|
|
|
@@ -279,36 +236,6 @@ bundle match 'https://github.com/kmafeni04/match.kak' %{
|
|
|
|
map global match U ': match-surround-redo<ret>' -docstring "Redo"
|
|
|
|
map global match U ': match-surround-redo<ret>' -docstring "Redo"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# PICKERS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bundle pickers https://codeberg.org/kmafeni04/pickers.kak %{
|
|
|
|
|
|
|
|
declare-user-mode pickers
|
|
|
|
|
|
|
|
map global user u ':enter-user-mode pickers<ret>' -docstring 'pickers mode'
|
|
|
|
|
|
|
|
map global pickers b ':pickers-buffer<ret>' -docstring 'Open fuzzy buffer picker'
|
|
|
|
|
|
|
|
map global pickers i ':pickers-buffer-info<ret>' -docstring 'Show currently open buffers'
|
|
|
|
|
|
|
|
map global pickers a ':pickers-buffer-alternate<ret>' -docstring 'Switch to previously opened buffer'
|
|
|
|
|
|
|
|
map global pickers f ':pickers-file<ret>' -docstring 'Open fuzzy file picker in git root or current working directory'
|
|
|
|
|
|
|
|
map global pickers n ':pickers-file /home/lupan/notes/<ret>' -docstring 'Open fuzzy file picker in notes directory'
|
|
|
|
|
|
|
|
map global pickers o ':pickers-file-cbd<ret>' -docstring "Open fuzzy file picker in current buffer's directory"
|
|
|
|
|
|
|
|
map global pickers g ':pickers-grep<ret>' -docstring "Open grep picker in git root"
|
|
|
|
|
|
|
|
map global pickers G "<dquote>/y:pickers-grep<ret>" -docstring "Open grep picker in git root with selection as init"
|
|
|
|
|
|
|
|
map global pickers <a-g> ':pickers-grep-cbd<ret>' -docstring "Open grep picker in buffer's directory"
|
|
|
|
|
|
|
|
map global pickers <a-G> "<dquote>/y:pickers-grep-cbd<ret>" -docstring "Open grep picker in buffer's directory with selection as init"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hook global WinCreate \*pickers-grep\* %{
|
|
|
|
|
|
|
|
map window normal <ret> ':pickers-grep-open<ret>'
|
|
|
|
|
|
|
|
map window normal <a-ret> "%%s<ret>)" -docstring "Select all matched grep text"
|
|
|
|
|
|
|
|
alias window write pickers-grep-write
|
|
|
|
|
|
|
|
alias window w pickers-grep-write
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
hook global WinCreate \*pickers-file\* %{
|
|
|
|
|
|
|
|
map window normal <ret> ':pickers-file-open<ret>'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
hook global WinCreate \*pickers-buffer\* %{
|
|
|
|
|
|
|
|
map window normal <ret> ':pickers-buffer-open<ret>'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# HARPOON
|
|
|
|
# HARPOON
|
|
|
|
|
|
|
|
|
|
|
|
bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
|
|
|
|
bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
|
|
|
@@ -319,8 +246,6 @@ bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
|
|
|
|
|
|
|
|
|
|
|
|
eval %sh{ kak-tree-sitter -dks --init $kak_session }
|
|
|
|
eval %sh{ kak-tree-sitter -dks --init $kak_session }
|
|
|
|
|
|
|
|
|
|
|
|
map global -docstring 'Tree-sitter' user 't' ': enter-user-mode tree-sitter<ret>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define-command -override tree-sitter-user-after-highlighter %{
|
|
|
|
define-command -override tree-sitter-user-after-highlighter %{
|
|
|
|
add-highlighter -override buffer/show-matching show-matching
|
|
|
|
add-highlighter -override buffer/show-matching show-matching
|
|
|
|
}
|
|
|
|
}
|
|
|
|