More changes
This commit is contained in:
@@ -4,7 +4,15 @@ local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
|
||||
local function get_psr4_root()
|
||||
local function get_psr4_root(path)
|
||||
-- local dir = vim.fs.dirname(path)
|
||||
-- while dir ~= '/' and dir ~= nil do
|
||||
-- local composer_json_path = dir .. '/composer.json'
|
||||
-- if vim.fn.filereadable(composer_json_path) == 1 then
|
||||
-- break
|
||||
-- end
|
||||
-- dir = vim.fs.dirname(dir)
|
||||
-- end
|
||||
local handle = io.popen [[php -r "echo array_keys(json_decode(file_get_contents('composer.json'), true)['autoload']['psr-4'])[0];"]]
|
||||
local ns_root = handle and handle:read '*a' or ''
|
||||
if handle then
|
||||
|
||||
Reference in New Issue
Block a user