feature/syntax-checker: new +childframe flag for popups
This commit is contained in:
parent
a34489356e
commit
30e0ab6aef
4 changed files with 15 additions and 4 deletions
|
@ -15,7 +15,8 @@
|
||||||
services ; TODO managing external services & code builders
|
services ; TODO managing external services & code builders
|
||||||
snippets ; my elves. They type so I don't have to
|
snippets ; my elves. They type so I don't have to
|
||||||
spellcheck ; tasing you for misspelling mispelling
|
spellcheck ; tasing you for misspelling mispelling
|
||||||
syntax-checker ; tasing you for every semicolon you forget
|
(syntax-checker ; tasing you for every semicolon you forget
|
||||||
|
+childframe) ; use childframes for error popups (Emacs 26+ only)
|
||||||
version-control ; remember, remember that commit in November
|
version-control ; remember, remember that commit in November
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
workspaces ; tab emulation, persistence & separate workspaces
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
(defun +syntax-checker-show-popup (errors)
|
(defun +syntax-checker-show-popup (errors)
|
||||||
"TODO"
|
"TODO"
|
||||||
(if (and EMACS26+ (display-graphic-p))
|
(if (and EMACS26+
|
||||||
|
(featurep! +childframe)
|
||||||
|
(display-graphic-p))
|
||||||
(flycheck-posframe-show-posframe errors)
|
(flycheck-posframe-show-posframe errors)
|
||||||
(flycheck-popup-tip-show-popup errors)))
|
(flycheck-popup-tip-show-popup errors)))
|
||||||
|
|
||||||
|
@ -16,6 +18,9 @@
|
||||||
"TODO"
|
"TODO"
|
||||||
:lighter nil
|
:lighter nil
|
||||||
:group 'doom
|
:group 'doom
|
||||||
|
(if (featurep! +childframe)
|
||||||
|
(require 'flycheck-posframe)
|
||||||
|
(require 'flycheck-popup-tip))
|
||||||
(let ((hooks '(post-command-hook focus-out-hook)))
|
(let ((hooks '(post-command-hook focus-out-hook)))
|
||||||
(cond
|
(cond
|
||||||
;; Use our display function and remember the old one but only if we haven't
|
;; Use our display function and remember the old one but only if we haven't
|
||||||
|
|
|
@ -34,4 +34,9 @@
|
||||||
|
|
||||||
(def-package! flycheck-posframe
|
(def-package! flycheck-posframe
|
||||||
:when EMACS26+
|
:when EMACS26+
|
||||||
:commands flycheck-posframe-show-posframe)
|
:when (featurep! +childframe)
|
||||||
|
:commands flycheck-posframe-show-posframe
|
||||||
|
:config
|
||||||
|
(setq flycheck-posframe-warning-prefix "⚠ "
|
||||||
|
flycheck-posframe-info-prefix "··· "
|
||||||
|
flycheck-posframe-error-prefix "✕ "))
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
|
|
||||||
(package! flycheck)
|
(package! flycheck)
|
||||||
(package! flycheck-popup-tip)
|
(package! flycheck-popup-tip)
|
||||||
(when EMACS26+
|
(when (and EMACS26+ (featurep! +childframe))
|
||||||
(package! flycheck-posframe))
|
(package! flycheck-posframe))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue