AutoYADM commit: 2025-06-16 17:21:48

This commit is contained in:
Daniel Fichtinger 2025-06-16 17:21:48 -04:00
parent 42e3ad62a7
commit 2170e3418d
4 changed files with 57 additions and 9 deletions

View file

@ -11,6 +11,17 @@ hook global WinSetOption filetype=python %{
}
}
hook global WinSetOption filetype=toml %{
set-option window formatcmd "taplo fmt -"
hook -group toml-auto-format window BufWritePre .* %{
try format
}
hook -once -always window WinSetOption filetype=.* %{
unset-option window formatcmd
remove-hooks window toml-auto-format
}
}
hook global WinSetOption filetype=latex %{
set-option window formatcmd "tex-fmt --stdin"
hook -group latex-auto-format window BufWritePre .* %{
@ -126,3 +137,4 @@ hook global BufCreate .*[.](conf) %{
hook global BufCreate .*[.](jinja) %{
set-option buffer filetype html
}

View file

@ -0,0 +1,15 @@
hook global BufCreate .*[.](bib) %{
set-option buffer filetype bibtex
}
hook global WinSetOption filetype=bibtex %{
set-option window comment_line '%'
set-option window formatcmd "bibtex-tidy - --curly --drop-all-caps --remove-empty-fields --sort-fields --sort=year,author,id --strip-enclosing-braces --trailing-commas"
hook -group bibtex-auto-format window BufWritePre .* %{
try format
}
hook -once -always WinSetOption filetype=.* %{
unset-option window formatcmd
remove-hooks window bibtex-auto-format
}
}

View file

@ -280,6 +280,7 @@ hook -group lsp-filetype-typst global BufSetOption filetype=typst %{
set-option -add buffer lsp_servers "formatterPrintWidth = %opt{autowrap_column}"
}
remove-hooks global lsp-filetype-toml
hook -group lsp-filetype-toml global BufSetOption filetype=toml %{
set-option buffer lsp_servers %{
[taplo]