From 1cae082d668fe491a952168818d5604f5a19cf95 Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Wed, 10 Aug 2022 23:38:16 +0100 Subject: [PATCH] feat(syntax): add flymake configuration --- modules/checkers/syntax/config.el | 21 ++++++++++++++++++++- modules/checkers/syntax/packages.el | 14 +++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index f3503f5a8..b49e29cc7 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -4,6 +4,7 @@ ;;; Flycheck (use-package! flycheck + :unless (modulep! +flymake) :commands flycheck-list-errors flycheck-buffer :hook (doom-first-buffer . global-flycheck-mode) :config @@ -45,6 +46,7 @@ (use-package! flycheck-popup-tip + :unless (modulep! +flymake) :commands flycheck-popup-tip-show-popup flycheck-popup-tip-delete-popup :hook (flycheck-mode . +syntax-init-popups-h) :config @@ -63,6 +65,7 @@ (use-package! flycheck-posframe :when (modulep! +childframe) + :unless (modulep! +flymake) :hook (flycheck-mode . +syntax-init-popups-h) :config (setq flycheck-posframe-warning-prefix "! " @@ -80,4 +83,20 @@ ;; -;;; TODO Flymake +;;; Flymake +(use-package flymake + :when (modulep! +flymake) + :defer t + :init + (add-hook! (prog-mode text-mode) #'flymake-mode) + :config + (setq flymake-fringe-indicator-position 'right-fringe)) + + +(use-package flymake-popon + :when (modulep! +flymake) + :hook (flymake-mode . flymake-popon-mode) + :config + (setq flymake-popon-method (if (modulep! +childframe) + 'postframe + 'popon))) diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index ef318dd62..c5d2b9b86 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,9 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/syntax/packages.el -(package! flycheck :pin "784f184cdd9f9cb4e3dbb997c09d93e954142842") -(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") -(when (modulep! +childframe) - (package! flycheck-posframe :pin "8f60c9bf124ab9597d681504a73fdf116a0bde12")) +(unless (modulep! +flymake) + (package! flycheck :pin "784f184cdd9f9cb4e3dbb997c09d93e954142842") + (package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") + (when (modulep! +childframe) + (package! flycheck-posframe :pin "8f60c9bf124ab9597d681504a73fdf116a0bde12"))) -;; TODO flymake? +;; Flymake +(when (modulep! +flymake) + (package! popon :recipe (:repo "https://codeberg.org/akib/emacs-popon")) + (package! flymake-popon :recipe (:repo "https://codeberg.org/akib/emacs-flymake-popon")))