mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-20 16:48:34 +08:00
#4607 No conflicts with nvim-lspconfig by default
Default `g:ale_disable_lsp` to a new mode `'auto'` by default. With this setting applied, ALE will now check for the presence of nvim-lspconfig and automatically turn off particular LSP linters if already configured via nvim-lspconfig. For users that do not use `nvim-lspconfig`, everything should work as before.
This commit is contained in:
@@ -168,26 +168,20 @@ function! s:GoToLSPDefinition(linter, options, capability) abort
|
||||
endfunction
|
||||
|
||||
function! ale#definition#GoTo(options) abort
|
||||
for l:linter in ale#linter#Get(&filetype)
|
||||
if !empty(l:linter.lsp)
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'definition')
|
||||
endif
|
||||
for l:linter in ale#lsp_linter#GetEnabled(bufnr(''))
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'definition')
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! ale#definition#GoToType(options) abort
|
||||
for l:linter in ale#linter#Get(&filetype)
|
||||
if !empty(l:linter.lsp)
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'typeDefinition')
|
||||
endif
|
||||
for l:linter in ale#lsp_linter#GetEnabled(bufnr(''))
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'typeDefinition')
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! ale#definition#GoToImpl(options) abort
|
||||
for l:linter in ale#linter#Get(&filetype)
|
||||
if !empty(l:linter.lsp)
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'implementation')
|
||||
endif
|
||||
for l:linter in ale#lsp_linter#GetEnabled(bufnr(''))
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'implementation')
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user