summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorfoobarbyte <61650320+foobarbyte@users.noreply.github.com>2021-07-17 12:46:43 +0000
committerGitHub <noreply@github.com>2021-07-17 21:46:43 +0900
commit1893abdb1903fb45e7b28d3cd8ae7dd4197e0c3b (patch)
tree61e38f9ee2b80431168d443df5963e5e32c16ead /autoload
parentd6dbb5398e805466ab30b4e7f1c78d7c4168fcf8 (diff)
downloadale-1893abdb1903fb45e7b28d3cd8ae7dd4197e0c3b.zip
Python .tool versions (#3820)
* Also check for asdf-vm's .tool_versions file A minimal python project may only be specifying a python version using a version management tool like asdf-vm, without providing other common python project configuration files. asdf-vm creates a single .tool_versions file in the managed directory. By checking for .tool_versions in addition to other common python config files we ensure that python linters (whose behaviour typically depends on a particular python version) will run with the same version of python used by the project. This will also be the same python version used by vim itself when it is run from inside the project's directories. * add .tool_versions to ale-python-root documentation This reflects the corresponding change to autoload/ale/python.vim
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/python.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index fc6c1130..779844a2 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -34,6 +34,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
\|| filereadable(l:path . '/Pipfile.lock')
\|| filereadable(l:path . '/poetry.lock')
\|| filereadable(l:path . '/pyproject.toml')
+ \|| filereadable(l:path . '/.tool_versions')
return l:path
endif
endfor