mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Fix 4740 - add hurlfmt linter (#4741)
* Fix 4740 - add hurlfmt linter * Fix 4740 - add hurlfmt fixer * Fix wrong comments * Add end_col to qflist * Fix test
This commit is contained in:
@@ -103,6 +103,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['javascript', 'css', 'html'],
|
||||
\ 'description': 'Apply fecs format to a file.',
|
||||
\ },
|
||||
\ 'hurlfmt': {
|
||||
\ 'function': 'ale#fixers#hurlfmt#Fix',
|
||||
\ 'suggested_filetypes': ['hurl'],
|
||||
\ 'description': 'Fix hurl files with hurlfmt.',
|
||||
\ },
|
||||
\ 'tidy': {
|
||||
\ 'function': 'ale#fixers#tidy#Fix',
|
||||
\ 'suggested_filetypes': ['html'],
|
||||
|
||||
15
autoload/ale/fixers/hurlfmt.vim
Normal file
15
autoload/ale/fixers/hurlfmt.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
call ale#Set('hurl_hurlfmt_executable', 'hurlfmt')
|
||||
|
||||
function! ale#fixers#hurlfmt#GetCommand(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'hurl_hurlfmt_executable')
|
||||
|
||||
return ale#Escape(l:executable)
|
||||
\ . ' --out hurl'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#hurlfmt#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#fixers#hurlfmt#GetCommand(a:buffer)
|
||||
\}
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user