Use the --stdin-filename option for textlint, so configuration files will be discovered better

This commit is contained in:
w0rp
2018-03-26 10:35:10 +01:00
parent f6fc1edcdc
commit 7e4372bd1f
3 changed files with 10 additions and 18 deletions

View File

@@ -14,13 +14,11 @@ endfunction
function! ale#handlers#textlint#GetCommand(buffer) abort
let l:executable = ale#handlers#textlint#GetExecutable(a:buffer)
let l:config = ale#path#FindNearestFile(a:buffer, '.textlintrc')
let l:options = ale#Var(a:buffer, 'textlint_options')
return ale#node#Executable(a:buffer, l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '')
\ . ' -f json %t'
\ . ' -f json --stdin --stdin-filename %s'
endfunction
function! ale#handlers#textlint#HandleTextlintOutput(buffer, lines) abort