Skip to content

Commit

Permalink
fix(lsp): add non-nil guard to setup function (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suida authored May 7, 2023
1 parent a7246aa commit 4524216
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/noice/lsp/signature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function M.setup()
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("noice_lsp_signature", { clear = true }),
callback = function(args)
M.on_attach(args.buf, vim.lsp.get_client_by_id(args.data.client_id))
if args.data ~= nil then
M.on_attach(args.buf, vim.lsp.get_client_by_id(args.data.client_id))
end
end,
})
end
Expand Down

0 comments on commit 4524216

Please sign in to comment.