Fork me on GitHub

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).


shortcuts window



        "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.



❤️ 4

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.


That looks similar to an issue reported…