-
-
Notifications
You must be signed in to change notification settings - Fork 648
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] Add configuration for max-nested-depth and spacious #3664
Conversation
Looks good. A cider-nrepl artifact is being built. I'll bump it here then (please don't merge this before that) |
Done, you can merge master in |
34786fa
to
5e423d5
Compare
Thank you! I added a CHANGELOG commit, or is that unnecessary? |
6cca5ca
to
c689663
Compare
I changed |
c689663
to
fc7d0ce
Compare
Fair enough. I asked about this before seeing your comment. I'd suggest to mention the changes in this PR in the changelog as well and it'd be good if the new defcustom is also mentioned in the inspector's docs, so more people would actually discover it. |
fc7d0ce
to
a8ce01e
Compare
Ping 🙂 |
@alexander-yakushev Did you see my previous small remarks? I see there no changes after writing them (e.g. the incorrect CIDER version in one defcustom) |
cider-inspector.el
Outdated
"Default level of nesting for collections to display before truncating. | ||
The max depth can be also changed interactively within the inspector." | ||
:type '(integer :tag "Max nested collection depth" 5) | ||
:package-version '(cider . "1.1.4")) |
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.
1.14.0 :-)
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.
I still see the wrong version here.
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.
Right, this is my bad.
:package-version '(cider . "1.1.4")) | ||
|
||
(defvar cider-inspector-spacious-collections nil | ||
"Controls whether the inspector renders values in collections spaciously.") |
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.
Maybe explain a bit more what "spaciously" means in this context. If I didn't know what this controls I'd have a hard time figuring it out.
Btw, why did you decide to make this a defvar
instead of defcusom
? I doubt anyone was particularly attached to the extra spaces, but defcustoms are easier to discover.
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.
I saw your other comment, forget about this.
@@ -68,6 +68,10 @@ You'll have access to additional keybindings in the inspector buffer | |||
| `cider-inspector-set-max-coll-size` | |||
| Set a new maximum size above which nested collections are truncated | |||
|
|||
| kbd:[C] |
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.
I think it'd better to pick some free lowercase letter for this. (e.g. d
)
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.
I chose a capital letter intentionally to not take away a letter from the binding space. I don't consider this customization to be used often or ever. We'll probably change the default some time down the road I expect this variable will be changed dynamically in some unique cases, but otherwise, it's a meh variable to customize.
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.
Besides, there is certain synergy in changing length (*print-length*
) and depth (*print-depth*
), so they can be neighbours on the same letter, even if the letter itself does not relate to depth much.
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.
Fair enough.
inspector buffer using the `s`, `c`, and `a` keybindings. | ||
`cider-inspector-page-size`, `cider-inspector-max-coll-size`, | ||
`cider-inspector-max-nested-depth`, and `cider-inspector-max-atom-length`. The | ||
values can be adjusted for the current inspector buffer using the `s`, `c`, and |
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.
You didn't mention the new keybinding here. I wonder if it's a good idea to repeat here the data from the table above, though. Perhaps this sentence can be removed or made more generic to require fewer updates.
Hmm, perhaps I didn't press the button "finish review" then. 😅 |
a8ce01e
to
5a0f08d
Compare
Thanks and sorry about the delay here! |
The PR doesn't depend on
cider-nrepl
being the latest version, but a release of it would be appreciated before merging. CIDER versions in the customs are approximated.