summaryrefslogtreecommitdiff
path: root/ale_linters/python
diff options
context:
space:
mode:
authorAuri <me@aurieh.me>2017-11-08 19:58:56 +0200
committerw0rp <w0rp@users.noreply.github.com>2017-11-08 17:58:56 +0000
commit8a4cf923a8a3017fa683bd27d699d9b14720cd66 (patch)
tree7938bae1f68a36c332d3121ed6a1e58b5f8233c0 /ale_linters/python
parent86e807401795e3dcc9cac63dd3deb1323d048f13 (diff)
downloadale-8a4cf923a8a3017fa683bd27d699d9b14720cd66.zip
Add PyLS linter (#1097)
* Support PyLS (python language server) * Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot
Diffstat (limited to 'ale_linters/python')
-rw-r--r--ale_linters/python/pyls.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/ale_linters/python/pyls.vim b/ale_linters/python/pyls.vim
new file mode 100644
index 00000000..1b91c2c7
--- /dev/null
+++ b/ale_linters/python/pyls.vim
@@ -0,0 +1,21 @@
+" 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',
+\})