Skip to content

Commit ecc6f56

Browse files
committed
feat(phpactor): do not use lspconfig.util
1 parent f4229d9 commit ecc6f56

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lsp/phpactor.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
---
55
--- Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation
66

7-
local util = require 'lspconfig.util'
8-
97
return {
108
cmd = { 'phpactor', 'language-server' },
119
filetypes = { 'php' },
1210
root_dir = function(bufnr, on_dir)
13-
local fname = vim.api.nvim_buf_get_name(bufnr)
1411
local cwd = assert(vim.uv.cwd())
15-
local root = util.root_pattern('composer.json', '.git', '.phpactor.json', '.phpactor.yml')(fname)
12+
local root = vim.fs.root(bufnr, { 'composer.json', '.git', '.phpactor.json', '.phpactor.yml' }) or cwd
1613

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

0 commit comments

Comments
 (0)