mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +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 "")
|
||||
end,
|
||||
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
|
||||
end,
|
||||
color = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue