diff options
author | ohakutsu <dev@ohakutsu.com> | 2024-01-14 21:05:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-14 21:05:38 +0900 |
commit | 531970533a51557ae6a4614ec6a2fbae243a6c6b (patch) | |
tree | eb4163821a5e6d960d7d50376d584268079e5d9a /autoload | |
parent | 94f764631d6f04d3c9293399be2a7e941fc65f5d (diff) | |
download | ale-531970533a51557ae6a4614ec6a2fbae243a6c6b.zip |
Add language id of cspell (#4700)
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/cspell.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/handlers/cspell.vim b/autoload/ale/handlers/cspell.vim index 6137bdeb..605997ce 100644 --- a/autoload/ale/handlers/cspell.vim +++ b/autoload/ale/handlers/cspell.vim @@ -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 |