This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (1)
- # beginners (70)
- # boot (12)
- # calva (45)
- # cider (45)
- # clara (1)
- # cljdoc (10)
- # cljs-dev (133)
- # clojure (315)
- # clojure-dev (2)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (1)
- # clojure-spec (23)
- # clojure-uk (19)
- # clojurescript (48)
- # cursive (11)
- # data-science (5)
- # datomic (18)
- # figwheel-main (3)
- # fulcro (18)
- # graphql (14)
- # jackdaw (1)
- # juxt (1)
- # kaocha (1)
- # off-topic (10)
- # other-languages (3)
- # pathom (2)
- # pedestal (7)
- # re-frame (23)
- # reagent (1)
- # reitit (4)
- # ring-swagger (12)
- # rum (4)
- # shadow-cljs (26)
- # specter (6)
- # speculative (12)
- # tools-deps (44)
- # vim (8)
- # yada (2)
Ok, I have done more tests with multiple builds and approaches to change build for repl.
I tried to change
(do (require '[figwheel-sidecar.repl-api :as figwheel]) (figwheel/cljs-repl "front"))
But in that case switch to cljs does not happen, even new terminal for cljs repl is not created (empty command has the same effect btw). Escaped
"s break it?
Then I tried this version:
(do (require '[figwheel-sidecar.repl-api :as figwheel]) (figwheel/cljs-repl :front))
In that case it is called and new terminal is created, but I guess keywords are ignored:
My next steps: - I restore default
user=> (do (require '[figwheel-sidecar.repl-api :as figwheel]) (figwheel/cljs-repl :front)) Launching ClojureScript REPL for build: extranet
calva.startCLJSREPLCommandsetting. - I start repl and start figwheel with 2 builds: “front” & “extranet” - I connect with calva - At this point I see this in embedded “CloureScript REPL” terminal:
Launching ClojureScript REPL for build: extranet- As expected I can do all cool stuff with only extranet-related files - I quit cljs repl with
:cljs/quitin embedded “CloureScript REPL” terminal - I start repl for “front” in that same terminal:
And I see prompt. - I open some front-related file - Nothing is available for front-related file, but I still can do everything for extranet-related files. Also “Calva says” reports an error:
user=> (cljs-repl "front") Launching ClojureScript REPL for build: front
(switch-to-build "front")does not help. If I start figwheel for only one “front”, then I can navigate through front-related files.
@il.tmfv: Thanks for doing all this research! What if you try this after the step where you can do all the cool stuff for
1. Go to the terminal where you started figwheel with the 2 builds.
:cljs/quit and then
3. Reconnect Calva.
(This is somewhat what Calva does for switching between shadow-cljs builds.)
Nope, it didn’t help. I thought terminal where I start repl (I like to do it in a separate iTerm window, could this be the reason?) and all new java(lein) instances are separate processes in some point of view. Also after reconnect is called all repl terminals look like this
> new java(lein) instances are separate processes in some point of view. bad term, sorry I meant to say that they have separate instances of cljs-repl’s maybe just thinking out loud
I too use a separate iTerm window for starting my repl, so that is what I meant. I'll create me a multibuild project and see if I can figure this out. I'd appreciate an feature request for better support for this on the calva repo, if you have the time.
@pez sure Maybe it would be better to create project that mimics my project? I can do it today or tomorrow
If you create a project that can be used for verifying the issue and when the feature is supoorted, that would be awesome!
Are you using the default keybindings? I was trying to see if anyone set their keybindings for evaluating the forms a little different.
Might be more of the fact of vim being in insert/not insert mode and where the cursor is aligned causing issues with which form it picks up.
@pez Let me reset all my keybindings and i’ll write up some concrete stuff. I’ve been messing with it all morning.
eventually I got rid of vscodevim and am now using paredit navigation and a fancy keyboard with home row arrows
So much of it is finding the right balance between everything and is not particularly anything to do with Calva. 😛
I’d like to pick up a programmable keyboard and put paredit on the spare keys or another layer.
I have a terrible keyboard right now that makes pressing cmd+alt+ctrl+shift combinations a pain.
do it, it's a rabbit hole and you'll never be able to type on a normal keyboard again but your fingers will thank you
I have an Ergodox Ez at home but I don’t code on that machine much. It’s @ work that needs something.
one useful tool for remapping on mac is BetterTouchTool I use a das keyboard 4c ultimate + btt
I am using karabiner to remap alt on this keyboard to cmd. But it’s missing keys to give the full range of options on the right hand.
I'm curious about command/insert mode and if that makes Calva select different forms for evaluation.
Ctrl+Alt+V Alt+E > Evaluate current form (or selection) in REPL terminal In Vim Normal mode cursor is on the tail “)” it will evaluate the sexp inside of the currently selected position.
After I watched Stu’s scissors talk, I started to create (comment) based expressions at the bottom of files. But I often just sort of log what I do and eval to the repl.
I will play with inlining a bit and see how it flows vs putting it off to the repl.
We will fix the eval-to-repl commands. It was just that, since they are broken in what they select, they aren't a very good measures of wether there is a specific vim problem there. 😀