1
0
Fork 0

Add flycheck-posframe instead of flycheck-inline

With ‘flycheck-posframe’ I don’t have to worry about turning off ‘fci-mode’ when
a warning appears.
This commit is contained in:
Tom Willemse 2019-05-22 21:00:21 -07:00
parent 1c96f6fb98
commit ae490e2a32

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 20190306002858
;; Package-Requires: (flycheck flycheck-inline flycheck-cask oni-fci)
;; Version: 20190522210222
;; Package-Requires: (flycheck flycheck-posframe flycheck-cask)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -27,22 +27,7 @@
;;; Code:
(require 'flycheck)
(require 'flycheck-inline)
(autoload 'turn-off-fci-mode "fill-column-indicator")
(defun oni-flycheck-disable-fci (&rest _)
"Disable `fci-mode'."
(turn-off-fci-mode))
(defun oni-flycheck-enable-fci (&rest _)
"Enable `fci-mode'."
(turn-on-fci-mode))
(advice-add 'flycheck-inline-display-phantom
:before 'oni-flycheck-disable-fci)
(advice-add 'flycheck-inline-clear-phantoms
:after 'oni-flycheck-enable-fci)
(require 'flycheck-posframe)
(mapc (lambda (c) (delq c flycheck-checkers))
'(python-pylint python-pyflakes))
@ -56,8 +41,10 @@
(append '("--eval" "(package-initialize)")
flycheck-emacs-args))
(flycheck-posframe-configure-pretty-defaults)
(add-hook 'flycheck-mode-hook 'flycheck-cask-setup)
(add-hook 'flycheck-mode-hook 'flycheck-inline-mode)
(add-hook 'flycheck-mode-hook 'flycheck-posframe-mode)
;;;###autoload(with-eval-after-load 'flycheck (require 'oni-flycheck))