From ae490e2a32ec20cb95a966a3df473dce67b15f8b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 22 May 2019 21:00:21 -0700 Subject: 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. --- oni-flycheck.el | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'oni-flycheck.el') 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 ;; 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)) -- cgit v1.2.3-54-g00ecf