kakoune: format go before save, add key for git show

This commit is contained in:
2026-05-26 23:52:52 +02:00
parent e64ba55973
commit 8715860090

View File

@@ -50,6 +50,7 @@ map global -docstring 'Log' git-mode 'L' ': git log<ret>'
map global -docstring 'Show branch' git-mode 'c' ': git show-branch<ret>'
map global -docstring 'Status' git-mode 't' ': git status<ret>'
map global -docstring 'Show diff' git-mode 's' ': git-show-diff<ret>'
map global -docstring 'Show' git-mode 'S' ': git show<ret>'
map global -docstring 'Hide diff' git-mode 'h' ': git-hide-diff<ret>'
map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk<ret>'
map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk<ret>'
@@ -169,6 +170,12 @@ hook global BufSetOption filetype=odin %{
set-option buffer formatcmd 'odinfmt -stdin'
}
hook global BufSetOption filetype=go %{
hook -group buf-write-pre-fmt buffer BufWritePre .* %{
lsp-formatting-sync
}
}
# LSP
eval %sh{kak-lsp}