fix-proselint (#5074)

This commit is contained in:
PsickOSSH
2026-01-25 08:29:03 +01:00
committed by GitHub
parent c0dd8167a6
commit d59cb7b3c2
17 changed files with 129 additions and 31 deletions

View File

@@ -0,0 +1,25 @@
call ale#Set('proselint_executable', 'proselint')
function! ale#proselint#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'proselint_executable')
endfunction
function! ale#proselint#GetCommand(buffer, version) abort
let l:executable = ale#proselint#GetExecutable(a:buffer)
let l:escaped_exec = ale#Escape(l:executable)
if ale#semver#GTE(a:version, [0, 16, 0])
return l:escaped_exec . ' check %t'
else
return l:escaped_exec . ' %t'
endif
endfunction
function! ale#proselint#GetCommandWithVersionCheck(buffer) abort
return ale#semver#RunWithVersionCheck(
\ a:buffer,
\ ale#proselint#GetExecutable(a:buffer),
\ '%e version --output-format json',
\ function('ale#proselint#GetCommand')
\)
endfunction