kakone: try to auto-format when possible

This commit is contained in:
Leonardo Eugênio 2023-01-24 10:09:39 -03:00
parent 3fe411010d
commit fd5fcbccee

View file

@ -4,6 +4,10 @@ try %{
add-highlighter shared/python/code/function regex '\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(' 1:function 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 %{ hook global WinSetOption filetype=sh %{
set buffer formatcmd 'shfmt -s -ci -i "4"' set buffer formatcmd 'shfmt -s -ci -i "4"'
} }