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

Limited doc update for info op #901

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

[#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).

## 0.50.2 (2024-09-03)

* [#900](https://github.com/clojure-emacs/cider-nrepl/pull/900): Fix print middleware interfering with macroexpansion.
Expand Down
10 changes: 9 additions & 1 deletion doc/modules/ROOT/pages/nrepl-api/ops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ Returns::

Return a map of information about the specified symbol.

Note: Documentation may be incomplete; not all return keys are described.

Required parameters::
{blank}

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


Returns::
* `:arglists-str` The arguments list(s) accepted by the symbol, as a string, if applicable.
* `:column` The column number where the symbol is defined.
* `: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
* `: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
* `: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
* `:file` Either a URI or a relative path where the symbol is defined.
* `:line` The line number the symbol is defined.
* `:name` The unqualitfied name of the symbol.
* `:ns` The namespace the symbol belongs to.
* `:status` done


Expand Down Expand Up @@ -879,7 +887,7 @@ Required parameters::

Optional parameters::
* `: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".
* `:expander` The macroexpansion function to use. Possible values are "macroexpand-1", "macroexpand", or "macroexpand-all". Defaults to "macroexpand".
* `:expander` The macroexpansion function to use. Possible values are "macroexpand-1", "macroexpand", "macroexpand-step", or "macroexpand-all". Defaults to "macroexpand".
* `:ns` The namespace in which to perform the macroexpansion. Defaults to 'user for Clojure and 'cljs.user for ClojureScript.
* `:print-meta` If truthy, also print metadata of forms.

Expand Down
13 changes: 11 additions & 2 deletions src/cider/nrepl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,18 @@ If specified, the value will be concatenated to that of `orchard.meta/var-meta-a
(cljs/requires-piggieback
{:requires #{#'session}
:handles {"info"
{:doc "Return a map of information about the specified symbol."
{:doc "Return a map of information about the specified symbol.

Note: Documentation may be incomplete; not all return keys are described."
:optional info-params
:returns (merge {"status" "done"} fragments-doc)}
:returns (merge {"arglists-str" "The arguments list(s) accepted by the symbol, as a string, if applicable."
"column" "The column number where the symbol is defined."
"file" "Either a URI or a relative path where the symbol is defined."
"line" "The line number the symbol is defined."
"name" "The unqualitfied name of the symbol."
ikappaki marked this conversation as resolved.
Show resolved Hide resolved
"ns" "The namespace the symbol belongs to."
"status" "done"}
fragments-doc)}
"eldoc"
{:doc "Return a map of information about the specified symbol."
:optional info-params
Expand Down