This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-12
Channels
- # aleph (6)
- # announcements (11)
- # babashka (24)
- # beginners (127)
- # calva (33)
- # chlorine-clover (5)
- # cider (7)
- # clara (9)
- # cljs-dev (54)
- # cljsrn (5)
- # clojure (61)
- # clojure-australia (8)
- # clojure-bay-area (11)
- # clojure-europe (36)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-spec (6)
- # clojure-taiwan (1)
- # clojure-uk (8)
- # clojurescript (94)
- # code-reviews (2)
- # community-development (6)
- # conjure (26)
- # core-typed (1)
- # cursive (3)
- # datahike (4)
- # datomic (14)
- # events (1)
- # graphql (1)
- # honeysql (49)
- # introduce-yourself (5)
- # jobs-discuss (15)
- # kaocha (6)
- # lsp (8)
- # malli (1)
- # meander (5)
- # nrepl (1)
- # off-topic (21)
- # other-languages (1)
- # pathom (13)
- # podcasts-discuss (1)
- # polylith (1)
- # reitit (16)
- # shadow-cljs (50)
- # spacemacs (11)
- # sql (11)
- # tools-deps (21)
- # unrepl (1)
- # vim (9)
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
@srijayanth I think ctrl-arrows are mapped at the OS level to moving between desktops, you'll have to disable that from System Preferences
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
I think it is this issue. Which we haven’t investigated enough upstream: https://github.com/BetterThanTomorrow/calva/issues/1161
Obviously it can be changed, but I am setting this up for a bunch of interns, so I’d rather get defaults working
Wow. Alt right works. Didn’t realise both were mapped to the same fn
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.
Cool, thanks
@srijayanth I think ctrl-arrows are mapped at the OS level to moving between desktops, you'll have to disable that from System Preferences
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
?
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?
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. @UKFSJSM38 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?I didn't get the idea @U9A1RLFNV
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.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:
Hum, got it, I never realized that the docstring could be markdown, only code, but that makes sense, I'll double check that
I've created an issue for Calva here @U0AJQJCQ1: https://github.com/BetterThanTomorrow/calva/issues/1180. Thanks for bringing this up.
@U9A1RLFNV quick question, I'm wondering if vscode supports link on that markdown string
lsp-mode ATM doesn't support it, but I'm changing clojure-lsp to return the filepath in a link
if that works on vscode it would be cool otherwise, it will only print the string like lsp-mode does (you can check my print the filename is not underlined, so lsp-mode didn't mark it as a link)
yes, it would be similar to cider docs on emacs that has link to the file definition
@slawek098 @pez Created an issue for updating our cljfmt here: https://github.com/BetterThanTomorrow/calva/issues/1179 Didn't see an existing one.