From 4cd0506e7b8d3d51f5792f0c6dbe63975769e45f Mon Sep 17 00:00:00 2001 From: Bartek Jaskulski Date: Mon, 11 Sep 2023 15:10:28 +0200 Subject: feat(php): look for phpactor files #2774 Based on presence of phpactor-specific configuration files, allow client to attach, even if we are not inside a composer package or a git repository. Signed-off-by: Bart Jaskulski --- lua/lspconfig/server_configurations/phpactor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lspconfig/server_configurations/phpactor.lua') diff --git a/lua/lspconfig/server_configurations/phpactor.lua b/lua/lspconfig/server_configurations/phpactor.lua index 5a1f0d10..b3c40093 100644 --- a/lua/lspconfig/server_configurations/phpactor.lua +++ b/lua/lspconfig/server_configurations/phpactor.lua @@ -6,7 +6,7 @@ return { filetypes = { 'php' }, root_dir = function(pattern) local cwd = vim.loop.cwd() - local root = util.root_pattern('composer.json', '.git')(pattern) + local root = util.root_pattern('composer.json', '.git', '.phpactor.json', '.phpactor.yml')(pattern) -- prefer cwd if root is a descendant return util.path.is_descendant(cwd, root) and cwd or root -- cgit v1.2.3-70-g09d2