This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from flycheck to flymake (but with flymake-flycheck)
- Loading branch information
Showing
5 changed files
with
47 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
;;; init-flymake.el --- Configure Flymake global behaviour -*- lexical-binding: t -*- | ||
;;; Commentary: | ||
;;; Code: | ||
|
||
(with-eval-after-load 'flymake | ||
(defun sanityinc/eldoc-flymake-first () | ||
"Gives flymake's eldoc function priority in the minibuffer." | ||
(when flymake-mode | ||
(setq-local eldoc-documentation-functions | ||
(cons 'flymake-eldoc-function | ||
(delq 'flymake-eldoc-function eldoc-documentation-functions))))) | ||
|
||
(add-hook 'flymake-mode-hook 'sanityinc/eldoc-flymake-first)) | ||
|
||
|
||
;; Use flycheck checkers with flymake, to extend its coverage | ||
(when (maybe-require-package 'flymake-flycheck) | ||
;; Disable flycheck checkers for which we have flymake equivalents | ||
(with-eval-after-load 'flycheck | ||
(setq-default flycheck-disabled-checkers | ||
(append (default-value 'flycheck-disabled-checkers) | ||
'(emacs-lisp emacs-lisp-checkdoc emacs-lisp-package)))) | ||
|
||
(defun sanityinc/enable-flymake-flycheck () | ||
(setq-local flymake-diagnostic-functions | ||
(append flymake-diagnostic-functions | ||
(flymake-flycheck-all-chained-diagnostic-functions)))) | ||
|
||
(add-hook 'flymake-mode-hook 'sanityinc/enable-flymake-flycheck) | ||
(add-hook 'prog-mode-hook 'flymake-mode) | ||
(add-hook 'text-mode-hook 'flymake-mode)) | ||
|
||
(with-eval-after-load 'flymake | ||
;; Provide some flycheck-like bindings in flymake mode to ease transition | ||
(define-key flymake-mode-map (kbd "C-c ! n") 'flymake-goto-next-error) | ||
(define-key flymake-mode-map (kbd "C-c ! p") 'flymake-goto-prev-error) | ||
(define-key flymake-mode-map (kbd "C-c ! c") 'flymake-start)) | ||
|
||
|
||
(provide 'init-flymake) | ||
;;; init-flymake.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters