aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni/home/config/pop-os/emacs.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/oni/home/config/pop-os/emacs.el b/oni/home/config/pop-os/emacs.el
index cff0bfa..75a7fc6 100644
--- a/oni/home/config/pop-os/emacs.el
+++ b/oni/home/config/pop-os/emacs.el
@@ -177,3 +177,17 @@ buffers.")
(setq browse-url-browser-function #'browse-url-generic)
(setq browse-url-generic-args '("run" "--branch=stable" "--arch=x86_64" "--command=launch-script.sh" "--file-forwarding" "app.zen_browser.zen"))
(setq browse-url-generic-program "/usr/bin/flatpak")
+
+(defun oni-fixup-phpstan-filenames (errors)
+ "Change the file name from each error in ERRORS to one on local disk."
+ (mapcar
+ (lambda (e)
+ (setf (flycheck-error-filename e)
+ (expand-file-name
+ (string-replace "/app/" "" (flycheck-error-filename e))
+ (project-root (project-current))))
+ e)
+ errors))
+
+(with-eval-after-load 'flycheck-phpstan
+ (advice-add 'flycheck-phpstan-parse-output :filter-return #'oni-fixup-phpstan-filenames))