fix notify dep
This commit is contained in:
@ -85,23 +85,21 @@ function M.setup(capabilities)
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
local notify = require("notify")
|
|
||||||
cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
|
cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
|
||||||
-- is_cider_lsp_attached has been setup via on_init, but hasn't received
|
-- is_cider_lsp_attached has been setup via on_init, but hasn't received
|
||||||
-- sync response yet.
|
-- sync response yet.
|
||||||
local first_fire = vim.b["is_cider_lsp_attached"] == "no"
|
local first_fire = vim.b["is_cider_lsp_attached"] == "no"
|
||||||
vim.b["is_cider_lsp_attached"] = "yes"
|
vim.b["is_cider_lsp_attached"] = "yes"
|
||||||
if first_fire then
|
if first_fire then
|
||||||
notify("CiderLSP attached", "info", { timeout = 500 })
|
vim.notify("CiderLSP attached", "info")
|
||||||
require("lualine").refresh()
|
require("lualine").refresh()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cider_lsp_handlers["window/showMessage"] = function(_, result, ctx)
|
cider_lsp_handlers["window/showMessage"] = function(_, result, ctx)
|
||||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||||
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
|
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
|
||||||
notify({ result.message }, lvl, {
|
vim.notify({ result.message }, lvl, {
|
||||||
title = "LSP | " .. client.name,
|
title = "LSP | " .. client.name,
|
||||||
timeout = 1000,
|
|
||||||
keep = function()
|
keep = function()
|
||||||
return lvl == "ERROR" or lvl == "WARN"
|
return lvl == "ERROR" or lvl == "WARN"
|
||||||
end,
|
end,
|
||||||
|
@ -4,7 +4,6 @@ local deps = {
|
|||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
"nvim-lua/lsp-status.nvim",
|
"nvim-lua/lsp-status.nvim",
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
"ray-x/go.nvim",
|
"ray-x/go.nvim",
|
||||||
"ray-x/guihua.lua",
|
"ray-x/guihua.lua",
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user