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

help strings not formatted as expected #2555

Open
jamiepratt opened this issue May 19, 2024 · 1 comment
Open

help strings not formatted as expected #2555

jamiepratt opened this issue May 19, 2024 · 1 comment
Labels

Comments

@jamiepratt
Copy link

Hi Pez,

I made a minimal repo for a shadow-cljs project that requires fulcro and replicated this issue on my machine.

https://github.com/jamiepratt/calva-help-string

Here's a screenshot of the doc string displayed when hovering over the function name:

Screenshot 2024-05-19 at 13 12 09

In this case my workaround of hovering over the first param is not displaying a helpstring at all, not sure why it worked in my code base and is not working here.

Screenshot 2024-05-19 at 13 14 21

Jamie

@PEZ PEZ added the nrepl label May 19, 2024
@PEZ
Copy link
Collaborator

PEZ commented May 19, 2024

Hi! Thanks for reporting. I can reproduce it.

What trips Calva up is the indentation before the list. We can make the foo function in the repro misbehave the same way, like so:

(defn foo
 "Increments x if it is positive, otherwise returns x.
    - x: a number
    - returns: a number"
  [x]
  (if (pos? x)
    (inc x)
    x))

Not sure what we can do about it. We use VS Code API for making a MarkdownString from the doc string. Maybe the indents are non-standard Markdown?

It seems like clojure-lsp handles it, though. Disconnecting the REPL we get nicely formatted doc strings. Maybe that was what made your workaround work, cojure-lsp got to handle it, or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants