This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-23
Channels
- # announcements (12)
- # beginners (225)
- # calva (7)
- # cider (45)
- # clj-kondo (1)
- # cljdoc (1)
- # cljsrn (3)
- # clojure (112)
- # clojure-dev (45)
- # clojure-europe (6)
- # clojure-finland (2)
- # clojure-india (1)
- # clojure-nl (27)
- # clojure-spec (37)
- # clojure-uk (171)
- # clojurescript (39)
- # core-async (9)
- # cursive (22)
- # datascript (8)
- # datomic (50)
- # emacs (12)
- # figwheel-main (17)
- # fulcro (42)
- # garden (2)
- # hoplon (27)
- # jobs (4)
- # kaocha (8)
- # klipse (2)
- # luminus (2)
- # off-topic (9)
- # perun (33)
- # planck (2)
- # re-frame (9)
- # reagent (48)
- # reitit (5)
- # remote-jobs (1)
- # rum (2)
- # shadow-cljs (23)
- # slack-help (3)
- # spacemacs (18)
- # sql (7)
- # tools-deps (24)
- # unrepl (9)
- # vim (30)
Thought this might be useful for some people...
Something I use in intellij/cursive is the ability to select an expression and hit one of (
, [
, {
to wrap it. After wrapping the expression I don't want the selection anymore, so if I were wrapping (foo)
then I would want to get ( | (foo))
where |
would be my cursor.
I was struggling to configure this in calva but eventually came to a solution. I updated all of the Paredit: Wrap Around ...
commands so that their respective shortcuts are the wrappers themselves and updated the when
clause to include editorHasSelection
(otherwise I'd open a paren and the next expression would get slurped in).
Keybindings
{
"key": "shift+9",
"command": "paredit.wrapAroundParens",
"when": "editorTextFocus && editorHasSelection && !editorReadOnly && editorLangId =~ /clojure|scheme|lisp/ && paredit:keyMap =~ /original|strict/"
},
{
"key": "[",
"command": "paredit.wrapAroundSquare",
"when": "editorHasSelection && editorTextFocus && !editorReadOnly && editorLangId =~ /clojure|scheme|lisp/ && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+[",
"command": "paredit.wrapAroundCurly",
"when": "editorHasSelection && editorTextFocus && !editorReadOnly && editorLangId =~ /clojure|scheme|lisp/ && paredit:keyMap =~ /original|strict/"
}
Thanks @carmen! Can you add that to the wiki? There’s a page there named Customize Calva or some such.
Has someone had some luck running Calva on Windows 10? I tried the developer release 2.0 on Win for kicks.
It won's start jack-in, The project.clj is in the root folder of the proj (and starts on the Mac).
Cannot find project, no project.clj, deps.edn or shadow-cljs.edn. (Boot projects are not supported by Jack-in yet. You'll need to start those manually, then connect Calva.