Skip to content

Commit f701ab1

Browse files
ikappakibbatsov
authored andcommitted
Limited doc update for info op
(arglists-str, file, line, column, name, ns) Sample CIDER response (--> id "18" op "info" session "cdbe8f64-e972-482c-9677-9ae456aaae96" time-stamp "2024-09-17 18:59:41.733894000" ns "b" sym "a/abc" ) (<-- id "18" session "cdbe8f64-e972-482c-9677-9ae456aaae96" time-stamp "2024-09-17 18:59:41.736375000" arglists-str "[]" column 1 file "file:/D:/dev/clj/issue-cider-info/src/a.clj" line 3 name "abc" ns "a" resource "a.clj" status ("done") )
1 parent f7a2026 commit f701ab1

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

CHANGELOG.md

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

33
## master (unreleased)
44

5+
[#885 (partial)](https://github.com/clojure-emacs/cider-nrepl/issues/885): Limited update to `info` op doc (`arglists-str`, `file`, `line`, `column`, `name` and `ns` return keys).
6+
57
## 0.50.2 (2024-09-03)
68

79
* [#900](https://github.com/clojure-emacs/cider-nrepl/pull/900): Fix print middleware interfering with macroexpansion.

doc/modules/ROOT/pages/nrepl-api/ops.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ Returns::
442442

443443
Return a map of information about the specified symbol.
444444

445+
Note: Documentation may be incomplete; not all return keys are described.
446+
445447
Required parameters::
446448
{blank}
447449

@@ -460,9 +462,15 @@ If specified, the value will be concatenated to that of ``orchard.meta/var-meta-
460462

461463

462464
Returns::
465+
* `:arglists-str` The arguments list(s) accepted by the symbol, as a string, if applicable.
466+
* `:column` The column number where the symbol is defined.
463467
* `:doc-block-tags-fragments` May be absent. Represent the 'param', 'returns' and 'throws' sections a Java doc comment. It's a vector of fragments, where fragment is a map with ``:type`` ('text' or 'html') and ``:content`` plain text or html markup, respectively
464468
* `:doc-first-sentence-fragments` May be absent. Represents the first sentence of a Java doc comment. It's a vector of fragments, where fragment is a map with ``:type`` ('text' or 'html') and ``:content`` plain text or html markup, respectively
465469
* `:doc-fragments` May be absent. Represents the body of a Java doc comment, including the first sentence and excluding any block tags. It's a vector of fragments, where fragment is a map with ``:type`` ('text' or 'html') and ``:content`` plain text or html markup, respectively
470+
* `:file` Either a URI or a relative path where the symbol is defined.
471+
* `:line` The line number the symbol is defined.
472+
* `:name` The unqualitfied name of the symbol.
473+
* `:ns` The namespace the symbol belongs to.
466474
* `:status` done
467475

468476

@@ -879,7 +887,7 @@ Required parameters::
879887

880888
Optional parameters::
881889
* `:display-namespaces` How to print namespace-qualified symbols in the result. Possible values are "qualified" to leave all namespaces qualified, "none" to elide all namespaces, or "tidy" to replace namespaces with their aliases in the given namespace. Defaults to "qualified".
882-
* `:expander` The macroexpansion function to use. Possible values are "macroexpand-1", "macroexpand", or "macroexpand-all". Defaults to "macroexpand".
890+
* `:expander` The macroexpansion function to use. Possible values are "macroexpand-1", "macroexpand", "macroexpand-step", or "macroexpand-all". Defaults to "macroexpand".
883891
* `:ns` The namespace in which to perform the macroexpansion. Defaults to 'user for Clojure and 'cljs.user for ClojureScript.
884892
* `:print-meta` If truthy, also print metadata of forms.
885893

src/cider/nrepl.clj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,18 @@ If specified, the value will be concatenated to that of `orchard.meta/var-meta-a
288288
(cljs/requires-piggieback
289289
{:requires #{#'session}
290290
:handles {"info"
291-
{:doc "Return a map of information about the specified symbol."
291+
{:doc "Return a map of information about the specified symbol.
292+
293+
Note: Documentation may be incomplete; not all return keys are described."
292294
:optional info-params
293-
:returns (merge {"status" "done"} fragments-doc)}
295+
:returns (merge {"arglists-str" "The arguments list(s) accepted by the symbol, as a string, if applicable."
296+
"column" "The column number where the symbol is defined."
297+
"file" "Either a URI or a relative path where the symbol is defined."
298+
"line" "The line number the symbol is defined."
299+
"name" "The unqualitfied name of the symbol."
300+
"ns" "The namespace the symbol belongs to."
301+
"status" "done"}
302+
fragments-doc)}
294303
"eldoc"
295304
{:doc "Return a map of information about the specified symbol."
296305
:optional info-params

0 commit comments

Comments
 (0)