From 9f7d45b48935cb48eb05eaa53f4cdc6f75537d17 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 21 Nov 2021 14:57:14 +0000 Subject: [PATCH] feat(emacs): add psalm integration for php-mode Add the flycheck-psalm package and also add `.phpstub` files to be treated as php files so we get all of the lsp and and syntax highlighting --- site-modules/core/files/emacs/src/lang/php.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site-modules/core/files/emacs/src/lang/php.el b/site-modules/core/files/emacs/src/lang/php.el index fdebae1..7d7323a 100644 --- a/site-modules/core/files/emacs/src/lang/php.el +++ b/site-modules/core/files/emacs/src/lang/php.el @@ -6,9 +6,14 @@ ;; licence that can be found in the LICENCE file or at ;; https://www.practically.io/copyright/ + (use-package php-mode :ensure t - :mode "\\.php\\'") :hook ((php-mode . (lambda() (setq flycheck-local-checkers '((lsp . ((next-checkers . (php)))))))) (php-mode . lsp-deferred) (php-mode . tree-sitter-hl-mode)) + :mode + (("\\.php\\'" . php-mode) + ("\\.phpstub\\'" . php-mode))) + +(use-package flycheck-psalm :ensure t)