aboutsummaryrefslogtreecommitdiffstats
path: root/oni-flycheck.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-05-22 21:00:21 -0700
committerGravatar Tom Willemse2019-05-22 21:03:46 -0700
commitae490e2a32ec20cb95a966a3df473dce67b15f8b (patch)
tree5303479934de23192cc0a4cc48b6d50d55c7b294 /oni-flycheck.el
parent1c96f6fb98129bd088d5d69d81b8ad12fada01a3 (diff)
downloademacs-config-ae490e2a32ec20cb95a966a3df473dce67b15f8b.tar.gz
emacs-config-ae490e2a32ec20cb95a966a3df473dce67b15f8b.zip
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.
Diffstat (limited to 'oni-flycheck.el')
-rw-r--r--oni-flycheck.el25
1 files changed, 6 insertions, 19 deletions
diff --git a/oni-flycheck.el b/oni-flycheck.el
index 9098023..752108d 100644
--- a/oni-flycheck.el
+++ b/oni-flycheck.el
@@ -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))