From 5aa0b750f5179282ef99f04d17ad99d7da93f512 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 23 Apr 2025 04:48:12 -0700 Subject: ci(lint): deprecate util.path.is_descendant() on Nvim 0.11+ #3766 --- lsp/phpactor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lsp/phpactor.lua') diff --git a/lsp/phpactor.lua b/lsp/phpactor.lua index 638cf217..87e6c59d 100644 --- a/lsp/phpactor.lua +++ b/lsp/phpactor.lua @@ -11,10 +11,10 @@ return { filetypes = { 'php' }, root_dir = function(bufnr, on_dir) local fname = vim.api.nvim_buf_get_name(bufnr) - local cwd = vim.uv.cwd() + local cwd = assert(vim.uv.cwd()) local root = util.root_pattern('composer.json', '.git', '.phpactor.json', '.phpactor.yml')(fname) -- prefer cwd if root is a descendant - on_dir(util.path.is_descendant(cwd, root) and cwd or root) + on_dir(vim.fs.relpath(cwd, root) and cwd or root) end, } -- cgit v1.2.3-70-g09d2