Add intelephense lsp to php-mode.

This commit is contained in:
Kevin Baensch 2023-09-02 17:24:35 +02:00
parent e06910f8eb
commit dbe7fdfb4e
Signed by: derped
GPG key ID: C0F1D326C7626543
2 changed files with 9 additions and 1 deletions

View file

@ -23,6 +23,10 @@ mkIf (elem "emacs::lsp" config.machine.pkgs) {
(setq lsp-clients-deno-import-map "./import_map.json") (setq lsp-clients-deno-import-map "./import_map.json")
(setq lsp-clients-deno-config "./deno.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"))
''}
''; '';
}; };

View file

@ -4,6 +4,10 @@ with lib;
mkIf (elem "emacs::php-mode" config.machine.pkgs) { mkIf (elem "emacs::php-mode" config.machine.pkgs) {
programs.emacs.init.usePackage = { 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)))'';
};
}; };
} }