Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[layers/+lang/haskell] Prolong flycheck popup duration in Haskell layer. #13803

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,7 @@ Other:
- Fixed =goto-flycheck-error-list= (thanks to Thanh Vuong)
- Added lsp support for sqls
- Added layer variable =sql-lsp-sqls-workspace-config-path= to setting workspace configuration
- Added layer variable =syntax-checking-auto-hide-tooltips= (thanks to Martin Sosic)
**** Swift
- Update Swift REPL key bindings (thanks to Elliot Bulmer)
**** Systemd
Expand Down
14 changes: 14 additions & 0 deletions layers/+checkers/syntax-checking/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [[#enable-flycheck-globally][Enable flycheck globally]]
- [[#enable-support-for-traditional-error-navigation][Enable support for traditional error navigation]]
- [[#bitmaps][Bitmaps]]
- [[#auto-hide-tooltips][Auto hide tooltips]]
- [[#key-bindings][Key bindings]]

* Description
Expand Down Expand Up @@ -93,6 +94,19 @@ variable =syntax-checking-use-original-bitmaps= to =t=:
'((syntax-checking :variables syntax-checking-use-original-bitmaps t)))
#+END_SRC


** Auto hide tooltips
You can set time in seconds after which tooltips are automatically hidden by setting
the variable =syntax-checking-auto-hide-tooltips= to a positive number of seconds.

Default value of =syntax-checking-auto-hide-tooltips= is =nil=, and in that case tooltips
are kept open until the cursor is moved.

#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((syntax-checking :variables syntax-checking-auto-hide-tooltips 10)))
#+END_SRC

* Key bindings

| Key binding | Description |
Expand Down
3 changes: 3 additions & 0 deletions layers/+checkers/syntax-checking/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
(defvar syntax-checking-enable-tooltips t
"If non nil some feedback are displayed in tooltips.")

(defvar syntax-checking-auto-hide-tooltips nil
"If non-nil and positive number, auto hide tooltips after number of seconds.")

(defvar syntax-checking-enable-by-default t
"Enable syntax-checking by default.")

Expand Down
3 changes: 2 additions & 1 deletion layers/+checkers/syntax-checking/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
:defer t
:init
(with-eval-after-load 'flycheck
(flycheck-pos-tip-mode))))
(flycheck-pos-tip-mode)
(setq flycheck-pos-tip-timeout (or syntax-checking-auto-hide-tooltips 0)))))

(defun syntax-checking/pre-init-popwin ()
(spacemacs|use-package-add-hook popwin
Expand Down