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

@ -162,4 +162,24 @@ pin = "aeded3c10b41508c2d044cb8bcf728f9b5138d89"
[language.task.queries]
path = "runtime/queries/task"
# bibtex
[language.bibtex.grammar.source.git]
url = "https://github.com/latex-lsp/tree-sitter-bibtex"
pin = "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34"
[language.bibtex.grammar]
path = "src"
compile = "cc"
compile_args = ["-c", "-fpic", "../parser.c", "-I", ".."]
compile_flags = ["-O3"]
link = "cc"
link_args = ["-shared", "-fpic", "parser.o", "-o", "bibtex.so"]
link_flags = ["-O3"]
[language.bibtex.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "fed3edcab70b31b416eb31c2ccf4a979c120d640"
[language.bibtex.queries]
path = "runtime/queries/bibtex"

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]