From 0064b446a02be13dba0f16f084e073b347716710 Mon Sep 17 00:00:00 2001 From: ichigo-gyuunyuu <15829692+ichigo-gyuunyuu@users.noreply.github.com> Date: Wed, 21 Jul 2021 01:03:15 +0530 Subject: [Feature] Allow for custom path to a language server binary (#1043) --- lua/lang/php.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lua/lang/php.lua') diff --git a/lua/lang/php.lua b/lua/lang/php.lua index d1e4a729..632c4052 100644 --- a/lua/lang/php.lua +++ b/lua/lang/php.lua @@ -21,6 +21,9 @@ M.config = function() args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) }, stdin = false, }, + lsp = { + path = DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", + }, } end @@ -53,7 +56,7 @@ M.lsp = function() end require("lspconfig").intelephense.setup { - cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" }, + cmd = { O.lang.php.lsp.path, "--stdio" }, on_attach = require("lsp").common_on_attach, handlers = { ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { -- cgit v1.2.3