Skip to content

Commit

Permalink
Fix activeParameter=-1 for jdtls
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Feb 3, 2023
1 parent d2768cb commit 924e6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cmp_nvim_lsp_signature_help/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ source._item = function(self, signature, parameter_index)
parameter_index = (signature.activeParameter or parameter_index or 0) + 1

-- @see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#signatureHelp
if #parameters < parameter_index then
if #parameters < parameter_index or parameter_index == 0 then
parameter_index = 1
end

Expand Down

0 comments on commit 924e6e8

Please sign in to comment.