aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
authorChris Bandy <bandy.chris@gmail.com>2025-04-10 22:48:31 +0000
committerGitHub <noreply@github.com>2025-04-10 15:48:31 -0700
commit4ea9083b6d3dff4ddc6da17c51334c3255b7eba5 (patch)
treeb3c094868a4942151bf8ec0d5cd87bf7cac85a92 /lua/lspconfig/util.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar.gz
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar.bz2
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar.lz
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar.xz
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.tar.zst
nvim-lspconfig-4ea9083b6d3dff4ddc6da17c51334c3255b7eba5.zip
refactor: replace vim.loop with vim.uv #3703v2.0.0
The former is deprecated in neovim 0.10. Remove the check added in 9b89ba5f158f73779cd58d0bb2783dfb40b28b0e. See: https://github.com/neovim/neovim/blob/v0.10.0/runtime/doc/deprecated.txt#L55
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index 6b00eb59..b99f8555 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -3,7 +3,7 @@ local api = vim.api
local lsp = vim.lsp
local nvim_eleven = vim.fn.has 'nvim-0.11' == 1
-local iswin = vim.loop.os_uname().version:match 'Windows'
+local iswin = vim.uv.os_uname().version:match 'Windows'
local M = { path = {} }
@@ -103,7 +103,7 @@ function M.root_pattern(...)
for _, pattern in ipairs(patterns) do
local match = M.search_ancestors(startpath, function(path)
for _, p in ipairs(vim.fn.glob(table.concat({ escape_wildcards(path), pattern }, '/'), true, true)) do
- if vim.loop.fs_stat(p) then
+ if vim.uv.fs_stat(p) then
return path
end
end
@@ -194,7 +194,7 @@ end
-- Traverse the path calling cb along the way.
local function traverse_parents(path, cb)
- path = vim.loop.fs_realpath(path)
+ path = vim.uv.fs_realpath(path)
local dir = path
-- Just in case our algo is buggy, don't infinite loop.
for _ = 1, 100 do
@@ -245,11 +245,11 @@ function M.path.is_dir(filename)
return vim.fn.isdirectory(filename) == 1
end
---- @deprecated use `(vim.loop.fs_stat(path) or {}).type == 'file'` instead
+--- @deprecated use `(vim.uv.fs_stat(path) or {}).type == 'file'` instead
--- @param path string
--- @return boolean
function M.path.is_file(path)
- return (vim.loop.fs_stat(path) or {}).type == 'file'
+ return (vim.uv.fs_stat(path) or {}).type == 'file'
end
--- @deprecated use `vim.fs.dirname` instead
@@ -258,11 +258,11 @@ M.path.dirname = vim.fs.dirname
--- @deprecated use `vim.fs.normalize` instead
M.path.sanitize = vim.fs.normalize
---- @deprecated use `vim.loop.fs_stat` instead
+--- @deprecated use `vim.uv.fs_stat` instead
--- @param filename string
--- @return string|false
function M.path.exists(filename)
- local stat = vim.loop.fs_stat(filename)
+ local stat = vim.uv.fs_stat(filename)
return stat and stat.type or false
end