mirror of
https://github.com/dense-analysis/ale.git
synced 2026-04-13 19:29:33 +08:00
fix expert lsp stdio and register capability (#5113)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* pass --stdio flag to expert lsp server expert requires --stdio to use stdio transport but the linter definition launched it without the flag, so the server never entered lsp mode * handle client/registerCapability requests from lsp servers some lsp servers like expert send a client/registerCapability request after initialization to dynamically register capabilities, if ale does not respond the server blocks and never processes further messages like textDocument/didOpen
This commit is contained in:
@@ -241,6 +241,8 @@ function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort
|
||||
\ : a:response.result.items
|
||||
|
||||
call ale#lsp_linter#HandleLSPDiagnostics(a:conn_id, l:uri, l:diagnostics)
|
||||
elseif l:method is# 'client/registerCapability'
|
||||
call ale#lsp#SendResponse(a:conn_id, a:response.id, v:null)
|
||||
elseif l:method is# 'workspace/configuration'
|
||||
let l:items = get(get(a:response, 'params', {}), 'items', [])
|
||||
let l:config = ale#lsp#GetConnectionConfig(a:conn_id)
|
||||
|
||||
Reference in New Issue
Block a user