Skip to content

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

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Introduce errors-only value for cider-use-overlays #3524

merged 2 commits into from
Oct 16, 2023

Conversation

vemv
Copy link
Member

@vemv vemv commented Oct 15, 2023

Fixes #3522

It works as intended.

Cheers - V

@vemv vemv requested a review from bbatsov October 15, 2023 20:08
@@ -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)
Copy link
Member Author

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)

Copy link
Member

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)))
Copy link
Member

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
Copy link
Member

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.

@vemv vemv merged commit 151b02b into master Oct 16, 2023
@vemv vemv deleted the 3522 branch October 16, 2023 19:27
yqrashawn added a commit to yqrashawn/lispy that referenced this pull request Oct 30, 2023
function changed at clojure-emacs/cider#3524
which included in cider version v1.8.3
yqrashawn added a commit to yqrashawn/lispy that referenced this pull request Oct 30, 2023
function changed at clojure-emacs/cider#3524
which included in cider version v1.8.3
yqrashawn added a commit to yqrashawn/lispy that referenced this pull request Oct 30, 2023
function changed at clojure-emacs/cider#3524
which included in cider version v1.9.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finer-grained opt-in to overlays
2 participants