feature/syntax-checker: new +childframe flag for popups

This commit is contained in:
Henrik Lissner 2018-05-09 11:26:06 +02:00
parent a34489356e
commit 30e0ab6aef
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 15 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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 ""))

View file

@ -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))