From 8947227afcd9f19a6502f7c1c562e62d559b16a8 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Thu, 3 Oct 2019 20:52:45 +0200 Subject: [PATCH] Add missing conditionals for flymake/flycheck bindings (#1835) --- modules/config/default/+evil-bindings.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 2b734d533..a8f35bc0d 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -616,7 +616,11 @@ :desc "Open REPL" "r" #'+eval/open-repl-other-window :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines - :desc "List errors" "x" #'flycheck-list-errors) + (:when (featurep! :tools flycheck) + :desc "List errors" "x" #'flycheck-list-errors) + (:unless (featurep! :tools flycheck) + :desc "List errors" "x" #'flymake-show-diagnostics-buffer) + ) ;;; f --- file (:prefix-map ("f" . "file") @@ -822,7 +826,10 @@ ;;; t --- toggle (:prefix-map ("t" . "toggle") :desc "Big mode" "b" #'doom-big-font-mode - :desc "Flycheck" "f" #'flycheck-mode + (:when (featurep! :tools flycheck) + :desc "Flycheck" "f" #'flycheck-mode) + (:unless (featurep! :tools flycheck) + :desc "Flymake" "f" #'flymake-mode) :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen :desc "Evil goggles" "g" #'evil-goggles-mode :desc "Indent guides" "i" #'highlight-indent-guides-mode