Skip to content

Commit ac794fa

Browse files
committed
feat(smarty_ls): do no use lspconfig.util
1 parent 8973102 commit ac794fa

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lsp/smarty_ls.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
--- npm i -g vscode-smarty-langserver-extracted
1111
--- ```
1212

13-
local util = require 'lspconfig.util'
14-
1513
return {
1614
cmd = { 'smarty-language-server', '--stdio' },
1715
filetypes = { 'smarty' },
1816
root_dir = function(bufnr, on_dir)
19-
local fname = vim.api.nvim_buf_get_name(bufnr)
2017
local cwd = assert(vim.uv.cwd())
21-
local root = util.root_pattern('composer.json', '.git')(fname)
18+
local root = vim.fs.root(bufnr, { 'composer.json', '.git' }) or cwd
2219

2320
-- prefer cwd if root is a descendant
2421
on_dir(vim.fs.relpath(cwd, root) and cwd or root)

0 commit comments

Comments
 (0)