fix(nvim): do not let duplicate notifs for same lsp server show

This commit is contained in:
Price Hiller 2024-10-03 04:43:34 -05:00
parent a3f11710b2
commit dbbd9cbf44
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -293,8 +293,9 @@ return {
local last_clients = {}
db_timer:start(
100,
100,
0,
vim.schedule_wrap(function()
db_timer:stop()
local cur_clients = vim.lsp.get_clients({ bufnr = bufnr })
if #cur_clients > #last_clients then
last_clients = cur_clients
@ -311,7 +312,6 @@ return {
vim.bo[vim.api.nvim_win_get_buf(win)].filetype = "markdown"
end,
})
db_timer:stop()
end)
)
end