This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (24)
- # beginners (377)
- # calva (33)
- # cider (1)
- # circleci (22)
- # cljs-dev (7)
- # clojure (40)
- # clojure-europe (1)
- # clojure-france (9)
- # clojure-norway (3)
- # clojure-taiwan (2)
- # clojurescript (8)
- # conjure (10)
- # cryogen (2)
- # emacs (1)
- # fulcro (23)
- # helix (1)
- # hoplon (2)
- # luminus (7)
- # meander (3)
- # off-topic (2)
- # re-frame (7)
- # reagent (8)
- # reveal (38)
- # sci (13)
- # shadow-cljs (17)
- # tools-deps (17)
- # vim (1)
I am unsure what the command
calva.toggleKeybindingsEnabled . It seems to be a way to add custom keybindings? Is that right?
Someone had a workflow in which Calva's keybindings got in the way of other bindings, and they wanted to be able to quickly disable then, perform some action, and re-enable them
Ah, I did see something in the docs about that, just didnt make the connection to the command name. Thanks.
We just removed the default shortcut for that command, @jr0cket. It was a mistake that caused a lot of confusion. People would unknowingly press that combo and all Calva shortcuts were gone. Just noting this since I know you are building a shortcut binding scheme.
Ops, I ran the command. The shortcuts I'm defining are in the Vspacemacs extension though, so not affected. I'll check if I still havethe usual Calva keybindings 😆
It’s a toggle command so easy to restore. If you realize that that is what has happened, which is not always easy to realize.
Dear Calva friends. This is the last day on my short winter-leave from my daytime job. You’ll probably notice a bit of a lowering in the pace with which I can hack on Calva, and also a bit longer response times here from me. I have had a blast these last days, enjoying the nice coop with @brandon.ringe and also @ericdallo. Today I have made some changes to Calva mostly having to do with the Calva startup experience, and also added some settings for controlling which windows/panes that are automatically opened on start and on jack-in. Experienced Calva users might want to have a bit less of the holding of hands. I’ve just released these changes, together with the new command for opening the code where the current repl namespace is defined. Please enjoy Calva v2.0.145: • https://github.com/BetterThanTomorrow/calva/issues/920 • https://github.com/BetterThanTomorrow/calva/issues/922 • https://github.com/BetterThanTomorrow/calva/issues/923 • https://github.com/BetterThanTomorrow/calva/issues/923 • https://github.com/BetterThanTomorrow/calva/issues/923 • https://github.com/BetterThanTomorrow/calva/issues/923`ctrl+alt+c n`
Happy New Year, folks! So, when I have (func a b) and I want to put this in (func-2 (func a b), I start writing (func-2 but I cannot place the closing paren as it is fixed: (func-2) (func a b) How can I undo this setting? Thanks!
To be clear, I want: (func-2 (func a b)) But I cannot type this. Calva allows me (func-2) (func a b).
Take a look at the paredit docs:
slurp forward in particular
There is a setting for disabling the autoclosing parens. I don’t recommend it, but it is there. See Clojure Defaults here: https://calva.io/customizing/
I recommend keeping it autoclosing and followig @pavlos’s advice about slurping forward. That said, I don’t think slurping is necessary for this particiular case, unless I’ve misunderstood something.
I think the question was how to turn
(func a b) into
(func-2 (func a b))
So one way is:
(func-2) before the expression (like @U01BEC6NUSY said):
(func-2) (func a b)
2. then place the cursor right after the
(func-2|) (func a b)
3. slurp forward:
(func-2 (func a b))
Ah, yes, I did misunderstand. So I would do it the slurpy way too. It can also be done by first using the Grow Selection command until
(func a b) is selected, then type a
(. This will wrap it all in parens and place the cursor inside the last closing one. Then navigate to the opening paren (either by Backward sexp or Backward to List Start/Open), then type
func-2. Like so:
Ok, thanks to @pavlos and playing with settings.json I found out you can disable paredit by adding
Uh, I'd advise against disabling paredit altogether unless you're prepared to start counting parentheses. Structural editing takes some getting used to but it's really the only thing standing between you and insanity when coding in a lisp 😛
barriers to clojureworld are high enough for me. (The language is the smallest part in this.) But I appreciate your concerns.
Created pull request on VSpaceCode project to add key bindings for Calva.
VSpaceCode brings a Spacemacs style mnemonic keyboard driven menu (using the VS Code command pallete).
New key bindings in the VSpacemacs PR are for the Clojure major mode, so for example you can start a REPL using
, ' and evaluate a top level expression using
, e f
To use VSpaceCode, the only change suggested for Calva is to rebind the clearing of evaluation results from
The design of the key bindings is also in a text document here:
I will add some documentation to the VSpaceCode website and to the http://calva.io website
Nice, @jr0cket! A note about the toggleKeybidings command. It is not deprecrated. We just stopped providing a default shortcut for it.
Symbols begin with a non-numeric character and can contain alphanumeric characters and *, +, !, -, _, ', ?, <, > and = (other characters may be allowed eventually).
(def foo^bar 10) ; Syntax error reading source at (REPL:222:16). ; Metadata can only be applied to IMetas clj꞉neuralnet.gdl꞉> (symbol "foo^bar") foo^bar
So I guess the question may need clarification if you mean any symbol (including constructed from strings), or just those typed in code.
i think @chamaeleon makes good points.
i suspect @pez meant in source code.
the reader page linked has traditionally not been quite complete (gradually improving over time), but the examples above i think answer the question.
fwiw, in this particular tree-sitter-clojure, i went with not allowing
i think parcera also doesn't allow