mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-17 15:34:14 +08:00
(feat) add support for kulala_fmt fixer (#4925)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* (feat) add support for kulala_fmt fixer Co-authored-by: w0rp <w0rp@users.noreply.github.com>
This commit is contained in:
@@ -129,6 +129,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['hurl'],
|
||||
\ 'description': 'Fix hurl files with hurlfmt.',
|
||||
\ },
|
||||
\ 'kulala_fmt': {
|
||||
\ 'function': 'ale#fixers#kulala_fmt#Fix',
|
||||
\ 'suggested_filetypes': ['http', 'rest'],
|
||||
\ 'description': 'Fix http and rest files with kulala_fmt.',
|
||||
\ },
|
||||
\ 'tidy': {
|
||||
\ 'function': 'ale#fixers#tidy#Fix',
|
||||
\ 'suggested_filetypes': ['html'],
|
||||
|
||||
11
autoload/ale/fixers/kulala_fmt.vim
Normal file
11
autoload/ale/fixers/kulala_fmt.vim
Normal file
@@ -0,0 +1,11 @@
|
||||
" Author: hsanson <hsanson@gmail.com>
|
||||
" Description: kulala_fmt fixer for http and rest files.
|
||||
|
||||
call ale#Set('http_kulala_fmt_executable', 'kulala-fmt')
|
||||
|
||||
function! ale#fixers#kulala_fmt#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#Escape(ale#Var(a:buffer, 'http_kulala_fmt_executable')) . ' format %t > /dev/null',
|
||||
\ 'read_temporary_file': 1
|
||||
\ }
|
||||
endfunction
|
||||
Reference in New Issue
Block a user