aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/smarty_ls.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-23 04:48:12 -0700
committerGitHub <noreply@github.com>2025-04-23 04:48:12 -0700
commit5aa0b750f5179282ef99f04d17ad99d7da93f512 (patch)
treee3b2e4aebe73de9151b294a905bf26787e63d1fa /lsp/smarty_ls.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar.gz
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar.bz2
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar.lz
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar.xz
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.tar.zst
nvim-lspconfig-5aa0b750f5179282ef99f04d17ad99d7da93f512.zip
ci(lint): deprecate util.path.is_descendant() on Nvim 0.11+ #3766
Diffstat (limited to 'lsp/smarty_ls.lua')
-rw-r--r--lsp/smarty_ls.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lsp/smarty_ls.lua b/lsp/smarty_ls.lua
index 6fbaea02..a01cae4c 100644
--- a/lsp/smarty_ls.lua
+++ b/lsp/smarty_ls.lua
@@ -17,11 +17,11 @@ return {
filetypes = { 'smarty' },
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')(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,
settings = {
smarty = {