Add language id of cspell (#4700)

This commit is contained in:
ohakutsu
2024-01-14 21:05:38 +09:00
committed by GitHub
parent 94f764631d
commit 531970533a
2 changed files with 19 additions and 5 deletions

View File

@@ -14,9 +14,13 @@ endfunction
function! ale#handlers#cspell#GetCommand(buffer) abort
let l:executable = ale#handlers#cspell#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'cspell_options')
let l:filetype = getbufvar(a:buffer, '&filetype')
let l:language_id_option = empty(l:filetype) ? '' : '--language-id="' . l:filetype . '"'
return ale#node#Executable(a:buffer, l:executable)
\ . ' lint --no-color --no-progress --no-summary'
\ . ale#Pad(l:language_id_option)
\ . ale#Pad(l:options)
\ . ' -- stdin'
endfunction