Add support for pyls configuration options

Resolves #1443.
Heavily inspired by the analogous support added for elixir-ls.
This commit is contained in:
yut23
2019-01-20 23:52:44 -05:00
parent d1fc084b2d
commit f2db164268
3 changed files with 25 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
call ale#Set('python_pyls_executable', 'pyls')
call ale#Set('python_pyls_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pyls_auto_pipenv', 0)
call ale#Set('python_pyls_config', {})
function! ale_linters#python#pyls#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyls_auto_pipenv'))
@@ -31,4 +32,5 @@ call ale#linter#Define('python', {
\ 'command_callback': 'ale_linters#python#pyls#GetCommand',
\ 'project_root_callback': 'ale#python#FindProjectRoot',
\ 'completion_filter': 'ale#completion#python#CompletionItemFilter',
\ 'lsp_config_callback': ale#VarFunc('python_pyls_config'),
\})