diff --git a/pkgsets/emacs/lsp.nix b/pkgsets/emacs/lsp.nix index f86250a..284077b 100644 --- a/pkgsets/emacs/lsp.nix +++ b/pkgsets/emacs/lsp.nix @@ -23,6 +23,10 @@ mkIf (elem "emacs::lsp" config.machine.pkgs) { (setq lsp-clients-deno-import-map "./import_map.json") (setq lsp-clients-deno-config "./deno.json") ''} + ${optionalString (elem "emacs::php-mode" config.machine.pkgs) '' + (setq lsp-intelephense-php-version "8.2") + (setq lsp-intelephense-server-command `("${pkgs.nodePackages.intelephense}/bin/intelephense" "--stdio")) + ''} ''; }; diff --git a/pkgsets/emacs/php-mode.nix b/pkgsets/emacs/php-mode.nix index fa70cfa..8546a9f 100644 --- a/pkgsets/emacs/php-mode.nix +++ b/pkgsets/emacs/php-mode.nix @@ -4,6 +4,10 @@ with lib; mkIf (elem "emacs::php-mode" config.machine.pkgs) { programs.emacs.init.usePackage = { - php-mode.enable = true; + php-mode = { + enable = true; + hook = lib.optional (elem "emacs::lsp" config.machine.pkgs) + ''(typescript-mode . (lambda () (lsp)))''; + }; }; }