mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
refactor(copilot): dont use deprecated get_clients
This commit is contained in:
parent
bff3a99697
commit
22271cdbbc
1 changed files with 7 additions and 1 deletions
|
@ -33,7 +33,13 @@ return {
|
||||||
return icon .. (status.message or "")
|
return icon .. (status.message or "")
|
||||||
end,
|
end,
|
||||||
cond = function()
|
cond = function()
|
||||||
local ok, clients = pcall(vim.lsp.get_active_clients, { name = "copilot", bufnr = 0 })
|
if not package.loaded["copilot"] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local ok, clients = pcall(require("lazyvim.util").get_clients, { name = "copilot", bufnr = 0 })
|
||||||
|
if not ok then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return ok and #clients > 0
|
return ok and #clients > 0
|
||||||
end,
|
end,
|
||||||
color = function()
|
color = function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue