Close #1521 - Allow the language to be set with simple strings for LSP linters

This commit is contained in:
w0rp
2018-04-27 22:52:11 +01:00
parent d1d705cc84
commit 6ab3fdc4d0
11 changed files with 65 additions and 45 deletions

View File

@@ -14,16 +14,12 @@ function! ale_linters#python#pyls#GetCommand(buffer) abort
return ale#Escape(l: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#GetCommand',
\ 'language_callback': 'ale_linters#python#pyls#GetLanguage',
\ 'language': 'python',
\ 'project_root_callback': 'ale#python#FindProjectRoot',
\ 'completion_filter': 'ale#completion#python#CompletionItemFilter',
\})