diff options
author | Jesús <heckyel@hyperbola.info> | 2018-11-12 10:59:45 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-11-12 10:59:45 -0500 |
commit | 60be10712742af355dec9cd6a93764a49a227af6 (patch) | |
tree | 1940433691f34abf929f26727042fda7a607a451 /lisp/init-flycheck.el | |
parent | 9bcab5d2625e9e14344bb4dfee74a668ec68055c (diff) | |
download | emacs-personal-60be10712742af355dec9cd6a93764a49a227af6.tar.lz emacs-personal-60be10712742af355dec9cd6a93764a49a227af6.tar.xz emacs-personal-60be10712742af355dec9cd6a93764a49a227af6.zip |
Remove mmm-mode, php-mode :: only web-mode
Working in PHP languages with HTML is a daily task.
In the first instance I tried to combine its syntax with multi-web-mode but it consumed a lot of resources.
In the second instance I made the language reader using mmm-mode, reading php-mode in web mode.
However this has not been enough because the color problems between modes produce bugs.
Now only the web-mode for PHP works, and I have managed to activate PHP flycheck for web-mode.
Diffstat (limited to 'lisp/init-flycheck.el')
-rw-r--r-- | lisp/init-flycheck.el | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/init-flycheck.el b/lisp/init-flycheck.el index 2ddbe3f..aa513c5 100644 --- a/lisp/init-flycheck.el +++ b/lisp/init-flycheck.el @@ -6,8 +6,21 @@ ;; (add-hook 'emacs-lisp-mode-hook 'flycheck-mode) (add-hook 'html-mode-hook 'flycheck-mode) (add-hook 'js-mode-hook 'flycheck-mode) - (add-hook 'php-mode-hook 'flycheck-mode) - (add-hook 'mmm-mode-hook 'flycheck-mode) - (add-hook 'sh-mode-hook 'flycheck-mode)) + (add-hook 'web-mode-hook 'flycheck-mode) + (add-hook 'sh-mode-hook 'flycheck-mode) + :config + ;; support web-mode with PHP + (flycheck-define-checker mix-php + "A PHP syntax checker using the PHP command line interpreter. + See URL `https://php.net/manual/en/features.commandline.php'." + :command ("php" "-l" "-d" "error_reporting=E_ALL" "-d" "display_errors=1" + "-d" "log_errors=0" source) + :error-patterns + ((error line-start (or "Parse" "Fatal" "syntax") " error" (any ":" ",") " " + (message) " in " (file-name) " on line " line line-end)) + :modes (php-mode php+-mode web-mode)) + + (add-to-list 'flycheck-checkers 'mix-php) + ) (provide 'init-flycheck) |