AutoYADM commit: 2025-06-23 18:20:16

This commit is contained in:
Daniel Fichtinger 2025-06-23 18:20:16 -04:00
parent f0fb75b9c0
commit 85f0b8bddd
3 changed files with 19 additions and 2 deletions

View file

@ -33,6 +33,8 @@ hook global WinSetOption filetype=latex %{
unset-option window formatcmd unset-option window formatcmd
remove-hooks window latex-auto-format remove-hooks window latex-auto-format
} }
# declare-filetype-mode latex
# map window latex i
} }
hook global WinSetOption filetype=go %{ hook global WinSetOption filetype=go %{

View file

@ -0,0 +1,15 @@
hook global WinSetOption filetype=latex %{
set-option window formatcmd "tex-fmt --stdin"
set-option window autowrap_fmtcmd 'tex-fmt --stdin -l %c'
set-option window autowrap_format_paragraph true
hook -group latex-auto-format window BufWritePre .* %{
try format
}
hook -once -always window WinSetOption filetype=.* %{
unset-option window formatcmd
remove-hooks window latex-auto-format
}
# declare-filetype-mode latex
# map window latex i
}

View file

@ -274,12 +274,12 @@ hook -group lsp-filetype-latex global BufSetOption filetype=latex %{
# printf %s "$kak_opt_lsp_servers" | kak -f "$(printf '<a-s><a-k>dictionary =<ret>s\\[.*\\]<ret><a-i>]_a, "%s"' "$kak_selection")" # printf %s "$kak_opt_lsp_servers" | kak -f "$(printf '<a-s><a-k>dictionary =<ret>s\\[.*\\]<ret><a-i>]_a, "%s"' "$kak_selection")"
# } # }
# } # }
declare-user-mode latex declare-filetype-mode latex
map -docstring 'PDF preview search' buffer latex / ': texlab-forward-search<ret>' map -docstring 'PDF preview search' buffer latex / ': texlab-forward-search<ret>'
map -docstring 'add selection to ltex dictionary' buffer latex a ': ltex-dictionary-add<ret>' map -docstring 'add selection to ltex dictionary' buffer latex a ': ltex-dictionary-add<ret>'
map -docstring 'refresh ltex dictionary' buffer latex r ': ltex-dictionary-load<ret>' map -docstring 'refresh ltex dictionary' buffer latex r ': ltex-dictionary-load<ret>'
map -docstring 'edit ltex dictionary' buffer latex e ': ltex-dictionary-edit<ret>' map -docstring 'edit ltex dictionary' buffer latex e ': ltex-dictionary-edit<ret>'
map -docstring 'texlab build' buffer latex b ': texlab-build<ret>' map -docstring 'texlab build' buffer latex B ': texlab-build<ret>'
try lsp-progress-disable try lsp-progress-disable
} }