fixes
This commit is contained in:
parent
c1a592a787
commit
aca77b317d
|
@ -1,5 +1,6 @@
|
|||
local conf = { handlers = {} }
|
||||
|
||||
-- https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#configuration-options
|
||||
conf.handlers["intelephense"] = {
|
||||
init_options = {
|
||||
storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense",
|
||||
|
|
|
@ -565,16 +565,14 @@ function M.has_value(table, value)
|
|||
end
|
||||
|
||||
function M.get_gwd(path)
|
||||
local find = { ".git" }
|
||||
local opts = { stop = os.getenv("HOME"), upward = true, limit = 1, path = path }
|
||||
local found = vim.fs.find(find, opts)
|
||||
if found ~= nil then
|
||||
return vim.fs.dirname(found[1])
|
||||
end
|
||||
return require("lspconfig.util").find_git_ancestor(path or vim.fn.getcwd())
|
||||
end
|
||||
|
||||
function M.set_cwd()
|
||||
vim.fn.chdir(M.get_gwd())
|
||||
local dir = M.get_gwd()
|
||||
if dir ~= nil then
|
||||
vim.fn.chdir(dir)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -23,6 +23,8 @@ end
|
|||
|
||||
M.dependencies = { "mason.nvim", "neoconf.nvim", "neodev.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
|
||||
|
||||
M.cmd = { "LspInstall", "LspUninstall" }
|
||||
|
||||
M.config = function()
|
||||
|
|
Loading…
Reference in New Issue