From 3c3ff1fa704cd328085f14c9d8aef2a416467b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20H=C3=A4rtl?= Date: Fri, 3 Feb 2023 10:33:00 +0100 Subject: [PATCH] Fix activeParameter=-1 for jdtls --- lua/cmp_nvim_lsp_signature_help/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cmp_nvim_lsp_signature_help/init.lua b/lua/cmp_nvim_lsp_signature_help/init.lua index 73927a4..5cbca70 100644 --- a/lua/cmp_nvim_lsp_signature_help/init.lua +++ b/lua/cmp_nvim_lsp_signature_help/init.lua @@ -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