From fd5fcbcceeec1a29c1d0359e6c796408753f42de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 24 Jan 2023 10:09:39 -0300 Subject: [PATCH] kakone: try to auto-format when possible --- user/kak/filetypes.kak | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user/kak/filetypes.kak b/user/kak/filetypes.kak index 765c14f..8de3398 100644 --- a/user/kak/filetypes.kak +++ b/user/kak/filetypes.kak @@ -4,6 +4,10 @@ try %{ add-highlighter shared/python/code/function regex '\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(' 1:function } +hook global BufWritePre '.*' %{ + try format +} + hook global WinSetOption filetype=sh %{ set buffer formatcmd 'shfmt -s -ci -i "4"' }