calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
craftybones 2021-05-12T07:02:00.086300Z

on a mac, ctrl-right doesn’t seem to move forward a sexp. I’ve checked to see if there are any other shortcuts on it, doesn’t seem to be…wonder what the problem is

craftybones 2021-05-12T07:03:26.086700Z

Obviously it can be changed, but I am setting this up for a bunch of interns, so I’d rather get defaults working

craftybones 2021-05-12T07:08:42.087400Z

Wow. Alt right works. Didn’t realise both were mapped to the same fn

pez 2021-05-12T07:27:22.088400Z

They shouldn’t be. alt should be, ctrl should not.

craftybones 2021-05-12T07:29:13.088600Z

craftybones 2021-05-12T07:29:31.089100Z

pez 2021-05-12T07:30:35.090500Z

I don’t know why VS Code displays it like that. There’s an issue about it. But anyway, ctrl +up/down is not navigating sexpr on Mac.

craftybones 2021-05-12T07:31:15.090700Z

Cool, thanks

yuhan 2021-05-12T13:10:11.092100Z

Keyboard -> Shortcuts -> Mission Control

craftybones 2021-05-12T13:10:38.092300Z

I’ve got that disabled. The problem here isn’t that it is doing something else. The problem seems to be that VSCode lists both ctrl right and alt right as keyboard options

pez 2021-05-12T13:50:50.092500Z

I think it is this issue. Which we haven’t investigated enough upstream: https://github.com/BetterThanTomorrow/calva/issues/1161

otwieracz 2021-05-12T21:06:37.093400Z

Hey - is there any workaround for [2021-05-12 23:04:52.365] [exthost] [error] Namespaced keywords not supported ! calva-fmt.formatCurrentForm or you can’t plainly do any formatting of code with ::foo with calva-fmt?

pez 2021-05-12T21:17:35.094600Z

There is no workaround yet. We need to upgrade our fork of cljfmt.

az 2021-05-12T23:23:00.095700Z

Hi all, any tips on best practices for writing docstrings for nice rendering in Calva? Also on that note, wondering if it’s possible to render markdown somehow on hover?

bringe 2021-05-12T23:29:19.096400Z

@slawek098 @pez Created an issue for updating our cljfmt here: https://github.com/BetterThanTomorrow/calva/issues/1179 Didn't see an existing one.

bringe 2021-05-12T23:43:32.096600Z

The hovers do render markdown, but there are two sides to this. When a repl is not connected, the hover content comes from clojure-lsp. When the repl is connected, hover content comes from nrepl and I think is packaged/formatted by Calva. 1. When the repl is not connected, clojure-lsp sends the hover response like the below. @ericdallo Do you think it would be okay to not enclose the doc string in a clojure code block? I think this would allow the markdown the user sets in the doc string to be respected in the hover.

"contents": {
        "kind": "markdown",
        "value": "
clojure\ncore/one\n
\n
clojure\n[x]\n
\n\n----\n
clojure\n*hello world*\n
\n----\n*/home/brandon/development/clojure-test/src/core.clj*"
    }
2. When the repl is connected, hovers are formatted with this code here: https://github.com/BetterThanTomorrow/calva/blob/a1afb5799bc8f1e4063badb8964f462b1da7dfcc/src/providers/infoparser.ts#L168. I haven't examined it closely but I'm guessing something there prevents user-defined markup from being respected. @pez is there a reason for this?

ericdallo 2021-05-12T23:47:48.097Z

I didn't get the idea @brandon.ringe :thinking-face:

bringe 2021-05-12T23:51:27.097200Z

Currently in a doc string if I set it to "*hello world*" it should render as bold in the hover (in my opinion, at least). But clojure-lsp sends the doc string content back wrapped in a clojure code block (

clojure\n*hello world*\n
), so it renders it as code instead of making it bold.

bringe 2021-05-12T23:57:03.097400Z

Is there a reason for that? I would like it to not render as Clojure code, because it will highlight Clojure function names like if even when it's not meant to be code. Like so: