Skip to content

Commit

Permalink
Some LSP servers return null for the codeLensProvider capability
Browse files Browse the repository at this point in the history
  • Loading branch information
yegappan committed Sep 22, 2024
1 parent f9b776b commit 5ff1faa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/lsp/capabilities.vim
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ export def ProcessServerCaps(lspserver: dict<any>, caps: dict<any>)
# codeLensProvider
if lspserver.caps->has_key('codeLensProvider')
lspserver.isCodeLensProvider = true
if lspserver.caps.codeLensProvider->has_key('resolveProvider')
lspserver.isCodeLensResolveProvider = true
var codeLensProvider = lspserver.caps.codeLensProvider
if codeLensProvider->type() == v:t_dict
&& codeLensProvider->has_key('resolveProvider')
lspserver.isCodeLensResolveProvider = codeLensProvider.resolveProvider
else
lspserver.isCodeLensResolveProvider = false
endif
Expand Down

0 comments on commit 5ff1faa

Please sign in to comment.