mirror of
https://github.com/dense-analysis/ale.git
synced 2026-11-17 17:30:41 +08:00
Add the typstyle formatter as a fixer for Typst (#4927)
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
This commit is contained in:
1 parent
995d78435a
commit
fe6a91fb92
7 files changed
+76
No files matched your search
@@ -0,0 +1,20 @@
|
||||
" Author: Adrian Vollmer (computerfluesterer@protonmail.com)
|
||||
" Description: Typst formatter using typstyle
|
||||
|
||||
call ale#Set('typst_typstyle_executable', 'typstyle')
|
||||
call ale#Set('typst_typstyle_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('typst_typstyle_options', '')
|
||||
|
||||
function! ale#fixers#typstyle#Fix(buffer) abort
|
||||
let l:executable = ale#path#FindExecutable(
|
||||
\ a:buffer,
|
||||
\ 'typst_typstyle',
|
||||
\ ['typstyle']
|
||||
\)
|
||||
|
||||
let l:options = ale#Var(a:buffer, 'typst_typstyle_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable) . ' ' . l:options,
|
||||
\}
|
||||
endfunction
|
||||
Reference in new issue
Block a user