summaryrefslogtreecommitdiff
path: root/ale_linters/python/jedils.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/jedils.vim')
-rw-r--r--ale_linters/python/jedils.vim14
1 files changed, 13 insertions, 1 deletions
diff --git a/ale_linters/python/jedils.vim b/ale_linters/python/jedils.vim
index e82abd1b..46b2896b 100644
--- a/ale_linters/python/jedils.vim
+++ b/ale_linters/python/jedils.vim
@@ -4,6 +4,8 @@
call ale#Set('python_jedils_executable', 'jedi-language-server')
call ale#Set('python_jedils_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_jedils_auto_pipenv', 0)
+call ale#Set('python_jedils_auto_poetry', 0)
+call ale#Set('python_jedils_auto_uv', 0)
function! ale_linters#python#jedils#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_jedils_auto_pipenv'))
@@ -11,12 +13,22 @@ function! ale_linters#python#jedils#GetExecutable(buffer) abort
return 'pipenv'
endif
+ if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_jedils_auto_poetry'))
+ \ && ale#python#PoetryPresent(a:buffer)
+ return 'poetry'
+ endif
+
+ if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_jedils_auto_uv'))
+ \ && ale#python#UvPresent(a:buffer)
+ return 'uv'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_jedils', ['jedi-language-server'])
endfunction
function! ale_linters#python#jedils#GetCommand(buffer) abort
let l:executable = ale_linters#python#jedils#GetExecutable(a:buffer)
- let l:exec_args = l:executable =~? 'pipenv$'
+ let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
\ ? ' run jedi-language-server'
\ : ''
let l:env_string = ''