From 87158600903853854322efb1f6ee118e10b92df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Tue, 26 May 2026 23:52:52 +0200 Subject: [PATCH] kakoune: format go before save, add key for git show --- kakoune/.config/kak/kakrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kakoune/.config/kak/kakrc b/kakoune/.config/kak/kakrc index 7e7c1aa..7cc6910 100644 --- a/kakoune/.config/kak/kakrc +++ b/kakoune/.config/kak/kakrc @@ -50,6 +50,7 @@ map global -docstring 'Log' git-mode 'L' ': git log' map global -docstring 'Show branch' git-mode 'c' ': git show-branch' map global -docstring 'Status' git-mode 't' ': git status' map global -docstring 'Show diff' git-mode 's' ': git-show-diff' +map global -docstring 'Show' git-mode 'S' ': git show' map global -docstring 'Hide diff' git-mode 'h' ': git-hide-diff' map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk' map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk' @@ -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}