mirror of
https://github.com/dense-analysis/ale
synced 2024-12-11 17:06:52 +00:00
8a4cf923a8
* Support PyLS (python language server) * Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot
22 lines
683 B
VimL
22 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',
|
|
\})
|