This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-09
Channels
- # announcements (4)
- # babashka (16)
- # beginners (4)
- # calva (19)
- # cider (61)
- # clj-commons (3)
- # clj-kondo (8)
- # clojure (68)
- # clojure-boston (1)
- # clojure-brasil (1)
- # clojure-europe (16)
- # clojure-hungary (2)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojure-spec (2)
- # clojure-uk (4)
- # clojuredesign-podcast (16)
- # clojurescript (17)
- # core-typed (7)
- # cursive (17)
- # data-science (7)
- # datalevin (19)
- # datomic (1)
- # events (6)
- # hyperfiddle (6)
- # kaocha (9)
- # london-clojurians (2)
- # malli (10)
- # off-topic (1)
- # other-languages (24)
- # portal (2)
- # practicalli (19)
- # rdf (1)
- # reitit (2)
- # releases (2)
- # shadow-cljs (18)
- # testing (1)
- # xtdb (20)
- # yamlscript (4)
small curious issue with the Strict Prevent Unmatched Closing Bracket
option - When typing something like (test {})
on typing the closing }
, it indents and jumps the cursor to the start.
With Strict prevent
enabled:
I'm on [2.0.436]
- though I was on [2.0.435]
when I noticed this - I tried to update, hoping the fix got snuck in
Such fixes do not sneak in by themselves 😃 Please report on the repository. The videos are fine, but for the issue I prefer that there is also text showing the before and after situations and what you expect. We use |
for showing where the cursor is. So something like so:
With this text:
(a {|})
Type }
Expect:
(a {}|)
Actual
|(a {})
It is much easier to follow this than figuring out what’s going on in a video. And this notation is what we use to write our unit tests so we can easily create a failing test and try to make it pass.
Calva has a command for creating these textnotation (as we call them) snippets from a document. It will be printed to the output channel Calva says. What I do is that I open up a new untitled document (cmd+n) type the text there, place the cursor(s) or selection(s), then use the command.awesome, thank you! how do you tell vscode that the new file is a clojure document so that calva picks it up?
You figured out how to set the language for the new doc, I take it, but for completeness sake if someone searches and finds this thread. There is a command in VS Code Change Language Mode, default bound on Mac to Cmd+K M
. There is also a status bar item that you may or may not have active, showing the language mode, and it’s clickable.
aha! thanks - no, I was just manually typing the output into the issue, given that it's very simple.. forgot about the language widget in the bottom right corner!
Oh yeah, I started noticing this like months and months ago, and seem to have subconsciously learned to stop typing the closing token haha. I never bothered to learn whether this was calva/clj or vsc itself, or which setting did this. Thanks for surfacing this from my memory - if no one else gets round to it first I might take a look after some the multicursor stuff I'm working on