This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/ale_linters/python/pyls.vim
Auri 8a4cf923a8 Add PyLS linter (#1097)
* Support PyLS (python language server)
* Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot
2017-11-08 17:58:56 +00:00

21 lines
683 B
VimL

" Author: aurieh <me@aurieh.me>
" Description: A language server for Python
call ale#Set('python_pyls_executable', 'pyls')
function! ale_linters#python#pyls#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'python_pyls_executable')
endfunction
function! ale_linters#python#pyls#GetLanguage(buffer) abort
return 'python'
endfunction
call ale#linter#Define('python', {
\ 'name': 'pyls',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#python#pyls#GetExecutable',
\ 'command_callback': 'ale_linters#python#pyls#GetExecutable',
\ 'language_callback': 'ale_linters#python#pyls#GetLanguage',
\ 'project_root_callback': 'ale#python#FindProjectRoot',
\})