diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-19 19:46:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 19:46:13 +0100 |
commit | 169a6e26b2ca63ab0f2f5bb3d2176ff0a2f68bc3 (patch) | |
tree | 4a561b7ec1d056eb30a4b988625b4a4c3d8d49e1 /autoload | |
parent | e82bcdb8a6dc888130c03bc80cba492051c5ffbf (diff) | |
parent | dbe93529352880068cb738abb93a1bc009bf73ed (diff) | |
download | ale-169a6e26b2ca63ab0f2f5bb3d2176ff0a2f68bc3.zip |
Merge pull request #1719 from elebow/auto-pipenv-option-for-python-linters
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/python.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index 1f963431..8d6bf1f0 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -1,6 +1,8 @@ " Author: w0rp <devw0rp@gmail.com> " Description: Functions for integrating with Python linters. +call ale#Set('python_auto_pipenv', '0') + let s:sep = has('win32') ? '\' : '/' " bin is used for Unix virtualenv directories, and Scripts is for Windows. let s:bin_dir = has('unix') ? 'bin' : 'Scripts' @@ -107,3 +109,8 @@ function! ale#python#FindExecutable(buffer, base_var_name, path_list) abort return ale#Var(a:buffer, a:base_var_name . '_executable') endfunction + +" Detects whether a pipenv environment is present. +function! ale#python#PipenvPresent(buffer) abort + return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# '' +endfunction |