AutoYADM commit: 2025-05-15 21:40:01

This commit is contained in:
Daniel Fichtinger 2025-05-15 21:40:01 -04:00
parent b56e38ce51
commit 78e6028845
2 changed files with 22 additions and 9 deletions

View file

@ -0,0 +1,3 @@
hook global WinSetOption filetype=go %{
hook -group go-auto-format window BufWritePre .* lsp-formatting
}

View file

@ -79,15 +79,15 @@ map -docstring 'toggle screen centering' global ui z ": ui-scrolloff-toggle<ret>
declare-option bool autowrap false declare-option bool autowrap false
define-command autowrap-toggle -docstring "toggle autowrap" %{ define-command autowrap-toggle -docstring "toggle autowrap" %{
evaluate-commands %sh{ evaluate-commands %sh{
if [ "$kak_opt_autowrap" = "true" ]; then if [ "$kak_opt_autowrap" = "true" ]; then
echo "autowrap-disable" echo "autowrap-disable"
echo "set-option window autowrap false" echo "set-option window autowrap false"
else else
echo "autowrap-enable" echo "autowrap-enable"
echo "set-option window autowrap true" echo "set-option window autowrap true"
fi fi
} }
} }
map -docstring "toggle autowrap" global ui a ": autowrap-toggle<ret>" map -docstring "toggle autowrap" global ui a ": autowrap-toggle<ret>"
@ -131,6 +131,16 @@ def git_blame %{
} }
map -docstring "blame" global git b ": git_blame" map -docstring "blame" global git b ": git_blame"
# declare-option bool lsp_fmt false
# define-command -docstring "format buffer" format-safe %{
# try %sh{
# if [ "$kak_opt_lsp_fmt" = "true" ]; then
# echo "lsp-formatting"
# else
# echo "format"
# } catch %{ echo "Couldn't format" }
# }
map -docstring "format" global user F ": format<ret>" map -docstring "format" global user F ": format<ret>"
# Case-insensitive Search # Case-insensitive Search