mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-08 08:24:37 +02:00
refactor(eslint): use util.get_clients instead of deprecated method
This commit is contained in:
parent
599798a366
commit
e8c26c70e2
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ return {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local client = vim.lsp.get_active_clients({ bufnr = event.buf, name = "eslint" })[1]
|
local client = require("lazyvim.util").get_clients({ bufnr = event.buf, name = "eslint" })[1]
|
||||||
if client then
|
if client then
|
||||||
local diag = vim.diagnostic.get(event.buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
|
local diag = vim.diagnostic.get(event.buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
|
||||||
if #diag > 0 then
|
if #diag > 0 then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue