From 8a4cf923a8a3017fa683bd27d699d9b14720cd66 Mon Sep 17 00:00:00 2001 From: Auri Date: Wed, 8 Nov 2017 19:58:56 +0200 Subject: Add PyLS linter (#1097) * Support PyLS (python language server) * Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot --- ale_linters/python/pyls.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ale_linters/python/pyls.vim (limited to 'ale_linters/python/pyls.vim') 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 +" 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', +\}) -- cgit v1.2.3