AutoYADM commit: 2025-07-06 00:55:38

This commit is contained in:
Daniel Fichtinger 2025-07-06 00:55:38 -04:00
parent eec5d16019
commit db3ade3d3b

View file

@ -1,11 +1,14 @@
hook global WinSetOption filetype=python %{
# set-option window expandtab true
# set-option window softtabstop 4
set-option window formatcmd "ruff format --line-length 74 -"
set-option window formatcmd %{
ruff check --select I --fix --stdin-filename $kak_buffile - 2>/dev/null |
ruff format --line-length 74 -
}
hook -group python-auto-format window BufWritePre .* %{
try format
}
hook -once -always WinSetOption filetype=.* %{
hook -once -always window WinSetOption filetype=.* %{
unset-option window formatcmd
remove-hooks window python-auto-format
}
@ -158,13 +161,13 @@ hook global WinSetOption filetype=kdl %{
}
hook global WinSetOption filetype=mail %~
evaluate-commands %sh{
evaluate-commands %sh{
# stdin, we assume it's a pager
if [ "$kak_bufname" = "*stdin*" ]; then
echo 'define-command -hidden ismailreader nop'
fi
}
try %{
}
try %{
ismailreader
set buffer readonly true
try %{
@ -174,7 +177,7 @@ hook global WinSetOption filetype=mail %~
ui-wrap-disable
ui-scrolloff-disable
}
} catch %{
} catch %{
set-option window formatcmd 'mailfmt'
set-option window comment_line '>'
try autospell-enable
@ -183,7 +186,7 @@ hook global WinSetOption filetype=mail %~
unset-option window formatcmd
remove-hooks window mail-auto-format
}
}
}
~
hook global WinSetOption filetype=ini %{
@ -197,5 +200,3 @@ hook global BufCreate .*[.](conf) %{
hook global BufCreate .*[.](jinja) %{
set-option buffer filetype html
}