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

[Inspector] Configure truncation limits #3002

Merged

Conversation

pdbrown
Copy link
Contributor

@pdbrown pdbrown commented Apr 9, 2021

TODO: adjust cider-required-middleware-version when published

The limits after which the inspector truncates collection members are now
configurable. Previously they were hardcoded to 5 and 150 for collection and
atom (non-collection) members.

Add keybindings to cider-inspector-mode:

  • a adjust atom truncation limit (default 150)
  • c adjust nested collection truncation limit (default 5)

and add defcustoms to adjust the defaults

  • cider-inspector-max-atom-length
  • cider-inspector-max-coll-size

This continues the work in clojure-emacs/cider-nrepl#694 and needs to be updated with the right cider-nrepl version number before it can merge.


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

@pdbrown pdbrown force-pushed the feature/inspect-display-length branch from d96423c to 78ae6b2 Compare April 9, 2021 20:11
@@ -49,6 +49,12 @@ You'll have access to additional keybindings in the inspector buffer
| kbd:[s]
| Set a new page size in paginated view

| kbd:[c]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also mention the new defcustoms in the "Config" section. Seems we forgot to document any of the existing config options, but we should change this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! I added those and a brief mention of the fill-frame setting, so all cider-inspector.el defcustoms are covered.

cider.el Outdated
@@ -406,7 +406,7 @@ Elements of the list are artifact name and list of exclusions to apply for the a
(defconst cider-latest-clojure-version "1.10.1"
"Latest supported version of Clojure.")

(defconst cider-required-middleware-version "0.25.10"
(defconst cider-required-middleware-version "0.26-SNAPSHOT-TODO"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it should be 0.26.0-SNAPSHOT

The limits after which the inspector truncates collection members are now
configurable. Previously they were hardcoded to 5 and 150 for collection and
atom (non-collection) members.

Add keybindings to cider-inspector-mode:
- a  adjust atom truncation limit (default 150)
- c  adjust nested collection truncation limit (default 5)

and add defcustoms to adjust the defaults
- cider-inspector-max-atom-length
- cider-inspector-max-coll-size
@pdbrown pdbrown force-pushed the feature/inspect-display-length branch from 78ae6b2 to 123b220 Compare April 15, 2021 19:35
@pdbrown pdbrown marked this pull request as ready for review April 15, 2021 19:38
@bbatsov bbatsov merged commit 5993f96 into clojure-emacs:master Apr 15, 2021
@bbatsov
Copy link
Member

bbatsov commented Apr 15, 2021

Looks good. Thanks!

@pdbrown pdbrown deleted the feature/inspect-display-length branch April 15, 2021 21:16
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.

2 participants