fix(lsp): check completionProvider key existence, not emptiness (#5157)
CI / Build (push) Canceled after 0s
CI / Neovim 0.10 Windows (push) Canceled after 0s
CI / Neovim 0.12 Windows (push) Canceled after 0s
CI / Vim 8.2 Windows (push) Canceled after 0s
CI / Vim 9.2 Windows (push) Canceled after 0s
CI / Lint (push) Canceled after 0s
CI / Lua (push) Canceled after 0s
CI / Neovim 0.10 Linux (push) Canceled after 0s
CI / Neovim 0.12 Linux (push) Canceled after 0s
CI / Vim 8.2 Linux (push) Canceled after 0s
CI / Vim 9.2 Linux (push) Canceled after 0s

completionProvider: {} is valid per the LSP spec (means completion
enabled with default options). The old !empty() check incorrectly
rejected empty objects, causing ALE to silently disable completion
for servers that send completionProvider: {}.
This commit is contained in:
Johan
2026-08-21 11:38:28 +09:00
committed by GitHub
parent eff718bee9
commit e1789bc544
+3 -1
View File
@@ -265,7 +265,9 @@ function! ale#lsp#UpdateCapabilities(conn_id, capabilities) abort
let l:conn.capabilities.code_actions = 1
endif
if !empty(get(a:capabilities, 'completionProvider'))
let l:completion = get(a:capabilities, 'completionProvider', v:false)
if type(l:completion) is v:t_dict || l:completion is v:true
let l:conn.capabilities.completion = 1
endif