We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
lspconfig.util
1 parent 823e170 commit f4229d9Copy full SHA for f4229d9
1 file changed
lsp/phan.lua
@@ -4,8 +4,6 @@
4
---
5
--- Installation: https://github.com/phan/phan#getting-started
6
7
-local util = require 'lspconfig.util'
8
-
9
local cmd = {
10
'phan',
11
'-m',
@@ -23,9 +21,8 @@ return {
23
21
cmd = cmd,
24
22
filetypes = { 'php' },
25
root_dir = function(bufnr, on_dir)
26
- local fname = vim.api.nvim_buf_get_name(bufnr)
27
local cwd = assert(vim.uv.cwd())
28
- local root = util.root_pattern('composer.json', '.git')(fname)
+ local root = vim.fs.root(bufnr, { 'composer.json', '.git' }) or cwd
29
30
-- prefer cwd if root is a descendant
31
on_dir(vim.fs.relpath(cwd, root) and cwd or root)
0 commit comments