Skip to content

Commit 3948989

Browse files
committed
Merge branch 'master' of github.com:ray-x/lsp_signature.nvim
2 parents ebcf26b + 2951073 commit 3948989

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lua/lsp_signature/helper.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ helper.match_parameter = function(result, config)
259259
end
260260
if nextParameter.documentation and #nextParameter.documentation > 0 then
261261
nexp = nexp .. ': ' .. nextParameter.documentation
262+
-- this is to follow when the documentation is a table like {kind= xxx, value= zzz}
263+
elseif type(nextParameter.documentation) == 'table' and nextParameter.documentation.value then
264+
nexp = nexp .. ': ' .. nextParameter.documentation.value
262265
end
263266

264267
-- test markdown hl

lua/lsp_signature/init.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ local signature = function(opts)
734734
end
735735
end
736736

737-
local shift = math.max(1, trigger_position - 0)
737+
local shift = math.max(0, trigger_position - 0)
738738
local params = helper.make_position_params({
739739
position = {
740740
character = shift,
@@ -1252,8 +1252,7 @@ M.setup = function(cfg)
12521252
group = augroup,
12531253
callback = function(args)
12541254
local bufnr = args.buf
1255-
local client_id = lsp.get_client_by_id(args.data.client_id)
1256-
local client = vim.lsp.get_client_by_id(client_id)
1255+
local client = lsp.get_client_by_id(args.data.client_id)
12571256

12581257
if not client or not client:supports_method(sigcap) then
12591258
return

0 commit comments

Comments
 (0)