summaryrefslogtreecommitdiff
path: root/ale_linters/python/pyls.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/pyls.vim')
-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',
+\})