From 54311277fc5c3ed22850f804c25cd9c406d75646 Mon Sep 17 00:00:00 2001 From: Victor R <39545521+viicslen@users.noreply.github.com> Date: Fri, 14 Mar 2025 01:42:50 +0000 Subject: [PATCH] language/php: add initial support for intelephense php lsp (#709) * language/php: add initial support for intelephense php lsp * docs: update release notes --------- Co-authored-by: raf --- docs/release-notes/rl-0.8.md | 7 ++++++- modules/plugins/languages/php.nix | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index ee579d3e..bd52df0d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -244,6 +244,11 @@ - `alpha` is now configured with nix. -[Butzist](https://github.com/butzist) +[viicslen](https://github.com/viicslen): + +- Add `intelephense` language server support under + `vim.languages.php.lsp.server` + +[Butzist](https://github.com/butzist): - Add Helm chart support under `vim.languages.helm`. diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index d921b11d..4dccc8cd 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -64,6 +64,26 @@ } ''; }; + + intelephense = { + package = pkgs.intelephense; + lspConfig = '' + lspconfig.intelephense.setup{ + capabilities = capabilities, + on_attach = default_on_attach, + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else '' + { + "${getExe cfg.lsp.package}", + "--stdio" + }, + '' + } + } + ''; + }; }; in { options.vim.languages.php = {