Skip to content

Commit edba649

Browse files
[inspector] Tidy up namespaced-qualified keywords
1 parent 28b7ecd commit edba649

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### New features
66

7+
- [#3847](https://github.com/clojure-emacs/cider/issues/3847): Inspector: tidy up namespaced-qualified keywords.
8+
79
### Changes
810

911
- Bump the injected `nrepl` to [1.5.1](https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md#151-2025-10-18).

cider-inspector.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ The max depth can be also changed interactively within the inspector."
9494
:type 'boolean
9595
:package-version '(cider . "1.19.0"))
9696

97+
(defcustom cider-inspector-tidy-qualified-keywords t
98+
"Controls whether to abbreviate qualified keywords.
99+
When inspector is invoked from a code buffer, replace full namespace name
100+
with `::' or `::alias'."
101+
:type 'boolean
102+
:package-version '(cider . "1.20.0"))
103+
97104
(defcustom cider-inspector-skip-uninteresting t
98105
"Controls whether to skip over uninteresting values in the inspector.
99106
Only applies to navigation with `cider-inspector-prev-inspectable-object'
@@ -490,6 +497,8 @@ MAX-COLL-SIZE if non nil."
490497
`("max-nested-depth" ,cider-inspector-max-nested-depth))
491498
,@(when cider-inspector-display-analytics-hint
492499
`("display-analytics-hint" "true"))
500+
"tidy-qualified-keywords" ,(if cider-inspector-tidy-qualified-keywords
501+
"true" "false")
493502
"pretty-print" ,(if cider-inspector-pretty-print "true" "false")
494503
"sort-maps" ,(if cider-inspector-sort-maps "true" "false")
495504
"only-diff" ,(if cider-inspector-only-diff "true" "false")))

doc/modules/ROOT/pages/debugging/inspector.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ You can customize this value via the `cider-inspector-preferred-var-names`
155155
configuration option. Even after setting it, you are free to choose new names on
156156
the fly, as you type. Most recent names will take priority in subsequent usages.
157157

158+
When `cider-inspector-tidy-qualified-keywords` is enabled, namespace-qualified
159+
keyword like `::foo` or `::alias/baz` will be displayed in the same manner by
160+
the inspector if it was invoked in the code buffer of the same namespace or
161+
requires respective aliases.
162+
158163
== Additional Resources
159164

160165
* https://practicalli.github.io/spacemacs/evaluating-clojure/inspect/[Using CIDER's Inspector in Spacemacs]

0 commit comments

Comments
 (0)