-
-
Notifications
You must be signed in to change notification settings - Fork 649
Introduce errors-only
value for cider-use-overlays
#3524
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
Conversation
cider-overlays.el
Outdated
@@ -290,9 +292,10 @@ overlay." | |||
|
|||
|
|||
;;; Displaying eval result | |||
(defun cider--display-interactive-eval-result (value &optional point overlay-face) | |||
(defun cider--display-interactive-eval-result (value &optional point overlay-face error-p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(We probably should make error-p
mandatory so that consumers don't forget specifying this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a private API, so it's fine to change it. Perhaps it could be value-type
instead, so it'd give us more flexibility in the future. I guess it can also stay as optional right after value
, so at least the ordering of the args is more natural.
cider-eval.el
Outdated
@@ -865,7 +865,8 @@ when `cider-auto-inspect-after-eval' is non-nil." | |||
(cider--display-interactive-eval-result | |||
trimmed-err | |||
end | |||
'cider-error-overlay-face))) | |||
'cider-error-overlay-face | |||
:is-error))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Elisp it's more common to use symbols instead of keywords, so I'd go with 'is-error
.
@@ -189,7 +189,16 @@ variable. | |||
(setq cider-overlays-use-font-lock t) | |||
---- | |||
|
|||
You can disable overlays entirely (and display results in the echo-area at the | |||
You can restrict overlays to only be shown for errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also explain why this may make sense. Without some extra context I doubt many people, other than the person who asked for this, will end up using it.
function changed at clojure-emacs/cider#3524 which included in cider version v1.8.3
function changed at clojure-emacs/cider#3524 which included in cider version v1.8.3
function changed at clojure-emacs/cider#3524 which included in cider version v1.9.0
Fixes #3522
It works as intended.
Cheers - V