aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/health.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-10-02 21:21:27 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-10-02 21:21:27 +0200
commit38cd54b7063c4c45fb37c73ebfbd776939d0cfde (patch)
treec980703174a2d53b21f6a58f08ef0588c747b351 /lua/lspconfig/health.lua
parentfeat(lspinfo): replace :LspInfo with :checkhealth #3339 (diff)
downloadnvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar.gz
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar.bz2
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar.lz
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar.xz
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.tar.zst
nvim-lspconfig-38cd54b7063c4c45fb37c73ebfbd776939d0cfde.zip
fix(health): support Nvim 0.9
fix #3342
Diffstat (limited to 'lua/lspconfig/health.lua')
-rw-r--r--lua/lspconfig/health.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua
index 24d3444f..0ae72b8d 100644
--- a/lua/lspconfig/health.lua
+++ b/lua/lspconfig/health.lua
@@ -2,6 +2,7 @@ local M = {}
local health = require('vim.health')
local api, fn = vim.api, vim.fn
+local uv = vim.uv or vim.loop
local util = require 'lspconfig.util'
local error_messages = {
@@ -122,7 +123,6 @@ local function make_client_info(client, fname)
client_info.cmd = cmd_type[type(client.config.cmd)](client.config)
local workspace_folders = fn.has 'nvim-0.9' == 1 and client.workspace_folders or client.workspaceFolders
- local uv = vim.uv
fname = vim.fs.normalize(uv.fs_realpath(fname) or fn.fnamemodify(fn.resolve(fname), ':p'))
if workspace_folders then
@@ -189,8 +189,8 @@ local function check_lspconfig(bufnr)
health.warn('Deprecated servers: ' .. table.concat(deprecated_servers, ', '))
end
- local buf_clients = not bufnr and {} or vim.lsp.get_clients { bufnr = bufnr }
- local clients = vim.lsp.get_clients()
+ local buf_clients = not bufnr and {} or util.get_lsp_clients { bufnr = bufnr }
+ local clients = util.get_lsp_clients()
local buffer_filetype = bufnr and vim.fn.getbufvar(bufnr, '&filetype') or '(invalid buffer)'
local fname = bufnr and api.nvim_buf_get_name(bufnr) or '(invalid buffer)'