From 6c2fb86c6a03e20abea5ddd17d735885f0b7cb5e Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Wed, 24 Nov 2021 23:01:07 -0500 Subject: feat: expose configs --- lua/lspconfig/server_configurations/phpactor.lua | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lua/lspconfig/server_configurations/phpactor.lua (limited to 'lua/lspconfig/server_configurations/phpactor.lua') diff --git a/lua/lspconfig/server_configurations/phpactor.lua b/lua/lspconfig/server_configurations/phpactor.lua new file mode 100644 index 00000000..1b1947e2 --- /dev/null +++ b/lua/lspconfig/server_configurations/phpactor.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'phpactor', 'language-server' }, + filetypes = { 'php' }, + root_dir = function(pattern) + local cwd = vim.loop.cwd() + local root = util.root_pattern('composer.json', '.git')(pattern) + + -- prefer cwd if root is a descendant + return util.path.is_descendant(cwd, root) and cwd or root + end, + }, + docs = { + description = [[ +https://github.com/phpactor/phpactor + +Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation +]], + default_config = { + cmd = { 'phpactor', 'language-server' }, + root_dir = [[root_pattern("composer.json", ".git")]], + }, + }, +} -- cgit v1.2.3-70-g09d2