mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-12 13:11:49 +08:00
fixers/xo: support typescript options
This commit is contained in:
@@ -2,8 +2,17 @@
|
||||
" Description: Fixing files with XO.
|
||||
|
||||
function! ale#fixers#xo#Fix(buffer) abort
|
||||
let l:executable = ale#handlers#xo#GetExecutable(a:buffer, 'javascript')
|
||||
let l:options = ale#handlers#xo#GetOptions(a:buffer, 'javascript')
|
||||
let l:filetype = getbufvar(a:buffer, '&filetype')
|
||||
let l:type = ''
|
||||
|
||||
if l:filetype =~# 'javascript'
|
||||
let l:type = 'javascript'
|
||||
elseif l:filetype =~# 'typescript'
|
||||
let l:type = 'typescript'
|
||||
endif
|
||||
|
||||
let l:executable = ale#handlers#xo#GetExecutable(a:buffer, l:type)
|
||||
let l:options = ale#handlers#xo#GetOptions(a:buffer, l:type)
|
||||
|
||||
return {
|
||||
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
||||
|
||||
Reference in New Issue
Block a user