From 471d776d339f5abb22eaa6578b5c35e7423e5c39 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Fri, 4 Nov 2022 01:03:57 +0800 Subject: [PATCH] cmp: add signature help Signed-off-by: Avimitin Former-commit-id: af47f06804b432c5e8be695389298d87e5ef6bbd [formerly af47f06804b432c5e8be695389298d87e5ef6bbd [formerly 7f852a5a1a06d3ec2b0ac1924c9ddc14565c8445]] Former-commit-id: 4e929f49c4f625ca2a35c80dcf5934d424cf4e06 Former-commit-id: d7145991ff6ff4663658df8462da6684159da3cf --- lua/plugins/completion/config.lua | 3 +++ lua/plugins/completion/repos.lua | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lua/plugins/completion/config.lua b/lua/plugins/completion/config.lua index f86a8a55..e2ecb6e2 100644 --- a/lua/plugins/completion/config.lua +++ b/lua/plugins/completion/config.lua @@ -68,6 +68,8 @@ M.nvim_cmp_config = function() item.kind = "" item.menu = "Vim" return item + elseif entry.source.name == "nvim_lsp_signature_help" then + item.kind = "Property" end item.menu = item.kind item.kind = kind_icons[item.kind] @@ -113,6 +115,7 @@ M.nvim_cmp_config = function() }, sources = { { name = "nvim_lsp", priority = 99 }, + { name = "nvim_lsp_signature_help" }, { name = "vsnip" }, { name = "path" }, }, diff --git a/lua/plugins/completion/repos.lua b/lua/plugins/completion/repos.lua index 053e7e87..b4a15a2c 100644 --- a/lua/plugins/completion/repos.lua +++ b/lua/plugins/completion/repos.lua @@ -34,6 +34,13 @@ local repos = { }, }, + { + "hrsh7th/cmp-nvim-lsp-signature-help", + after = { + "nvim-cmp", + }, + }, + -- completion source for word in current buffer { "hrsh7th/cmp-buffer",