Start up language servers with Neovim's API

Get language servers starting and displaying diagnostics with Neovim's
API in Neovim 0.8 and up. With this set up, now ALE needs to take over
handling diagnostics returned by the language servers.
This commit is contained in:
w0rp
2025-03-17 17:34:50 +00:00
parent 7fcc0548b0
commit c9eb8f9d15
4 changed files with 142 additions and 8 deletions

View File

@@ -211,6 +211,16 @@ if g:ale_use_neovim_diagnostics_api && !has('nvim-0.7')
echoerr('Setting g:ale_use_neovim_diagnostics_api to 1 requires Neovim 0.7+.')
endif
let g:ale_use_neovim_lsp_api = get(g:, 'ale_use_neovim_lsp_api', has('nvim-0.8'))
" If 1, replaces ALE's use of jobs and channels to connect to language
" servers, plus the custom code, and instead hooks ALE into Neovim's built-in
" language server tools.
if g:ale_use_neovim_lsp_api && !has('nvim-0.8')
" no-custom-checks
echoerr('Setting g:ale_use_neovim_lsp_api to 1 requires Neovim 0.8+.')
endif
if g:ale_set_balloons is 1 || g:ale_set_balloons is# 'hover'
call ale#balloon#Enable()
endif