Skip to content

Commit 6eecb2e

Browse files
committed
Merge branch 'master' of github.com:ray-x/lsp_signature.nvim
2 parents 65a6f3f + 1e56259 commit 6eecb2e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lua/lsp_signature/init.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _LSP_SIG_CFG = {
4646
-- ignore error for some clients
4747
-- get client name by id
4848
local client = vim.lsp.get_client_by_id(ctx.client_id)
49-
if client and vim.tbl_contains({ 'rust_analyer', 'clangd' }, client.name) then
49+
if client and vim.tbl_contains({ 'rust-analyzer', 'clangd' }, client.name) then
5050
return true
5151
end
5252
end
@@ -1038,9 +1038,11 @@ M.on_attach = function(cfg, bufnr)
10381038
_LSP_SIG_VT_NS = api.nvim_create_namespace('lsp_signature_vt')
10391039
end
10401040

1041-
local signature_should_close_handler = function(err, result, ctx, _)
1041+
local signature_should_close_handler = function(err, result, ctx, config)
10421042
if err ~= nil then
1043-
print(err)
1043+
if not _LSP_SIG_CFG.ignore_error(err, ctx, config) then
1044+
print(err)
1045+
end
10441046
helper.cleanup_async(true, 0.01, true)
10451047
status_line = { hint = '', label = '' }
10461048
return
@@ -1246,7 +1248,10 @@ M.setup = function(cfg)
12461248
require('lsp_signature').on_attach({}, bufnr)
12471249

12481250
-- default if not defined
1249-
vim.api.nvim_set_hl(0, 'LspSignatureActiveParameter', { link = 'Search' })
1251+
local hi_parameter_hl = vim.api.nvim_get_hl(0, { name = _LSP_SIG_CFG.hi_parameter })
1252+
if hi_parameter_hl == nil or next(hi_parameter_hl) == nil then
1253+
vim.api.nvim_set_hl(0, _LSP_SIG_CFG.hi_parameter, { link = 'Search' })
1254+
end
12501255
if _LSP_SIG_CFG.show_struct.enable then
12511256
require('lsp_signature.codeaction').setup(cfg)
12521257
end

0 commit comments

Comments
 (0)