Skip to content

Commit

Permalink
Merge pull request #29 from mikehaertl/fix-jdtls-signature-help
Browse files Browse the repository at this point in the history
Fix activeParameter=-1 for jdtls
  • Loading branch information
hrsh7th authored Feb 3, 2023
2 parents d2768cb + 3c3ff1f commit 3d8912e
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 < 1 then
parameter_index = 1
end

Expand Down

0 comments on commit 3d8912e

Please sign in to comment.