Fork me on GitHub

Hello again. I'm continuing my attempts to get new calva running. Here is the jack-in failure


It's from "Calva Jack-In" console


That is "calva says" output


I'm able to connect to a running repl. But it exposes some strange behaviors.


1. Completions aren't substituted on Enter. Say I type @app get completion @app-state (which is correct), but after pressing enter i get @app executed.


2. The invitation string jumps from app's namespace to cljs.user, while it seems that expressions i type are always evaluated in app's namespace.


3. When I evaluate expression resulting in some bigger map only small piece of it get printed.


Also printing/pretty printing/inline print actions do same output slicing. Looks like the shortening algorithm from inline printing is now applied everywhere.


Putting the repls back into terminal view isn't an option anymore, right?


There's an issue about that on github, and it's on the todo list.


1. Completions are a bit funky. You need to complete with tab before submitting. 2. When you evaluate something from a file in the repl window, the repl window will switch to the file's namespace to evaluate the expression, then switch back again. I'm considering changing this behavior. 3. How big is that bigger map? How much of it gets printed? Sounds like something you should report as an issue.


The 3rd issue is gone now


That cider-nrepl loading error is strange. This is a long shot, but maybe you have something in your profile or the project that interferes...


I don't have any profile files. Is there a way to show all configuration sources in lein console?


@hoppy , @dominicm , I am looking at how to support custom cljs repls. Do any of you have a public project I can test with? Or anyone else in this channel, of course.


yeah @U0ETXRFEW, I'm having a hard time understanding what you are looking for here.


@hoppy, as I recall, you had a cljs project that wouldn’t work with Calva’s jack-in, Maybe I recall this wrong.


@U0C8489U6, I guess it can be a figwheel repl, if it is customized in a way that Calva fails to spawn it. But rather it would be any cljs repl that the built in Calva configs do not support. I am basing my support for this via a JSON setting where the user will enter a few strings that Calva uses for spawning and for checking connection status. It looks like so if I configure a standard Fgwheel repl with it:

        name: "Foo",
        ns: "figwheel-sidecar.repl-api",
        startCode: "(do (use 'figwheel-sidecar.repl-api) (if (not (figwheel-sidecar.repl-api/figwheel-running?)) (figwheel-sidecar.repl-api/start-figwheel!)) (figwheel-sidecar.repl-api/cljs-repl))",
        startedRegExp: "Figwheel: Starting server at",
        connectedRegExp: "Prompt will show"
I am not sure if this will suffice, and therefor would like some real world examples of custom cljs repls.


(Yes, that is a JS object, but it will be the corresponding JSON when it’s configured in settings.json. )


I have something of a frankenstein project that was using node and setting up the project with leiningen.


I'm not sure what the "right" way to set this up for calva would be


how do we want these to be done


It was your Frankenstein’s project I was thinking of. 😃


I’ll pack a vsix with the support I’m adding right now, and then we’ll see if you can get your project running with that.


perfect timing. Haven't worked on that in a while, but need to get it running to work on it tomorrow


@U0ETXRFEW is where it lives. It uses figwheel-main under the hood, but it's not using the main API, it has an alternative system for providing config. Instead you have to start with (dev-extras/cljs-repl) (after requiring that namespace ofc). You can generate a new app with bin/app --cljs acme/app


you'll need to start the nrepl with -A:dev:dev/build:build


one thing I'd find useful is the ability to include a file in generated projects which tells calva how to start the repl for this project.


If I get this to work, then that will be entirely possible.


Awesome 🙂


I run into problems starting my edge app:

Error building classpath. Manifest type not detected when finding deps for juxt.edge/app.logging in coordinate #:local{:root "../"}


That’s when starting with ../bin/rebel --cljs -A:dev:dev/build:build, but also all other ways I’ve tried. 😃


I don’t know what I am doing wrong. I’m following the instructions here:


Does those instructions work for you, @dominicm ?


@U0ETXRFEW I can share pet project of mine. There is some overengineering and crappy code, so I guess it's a good test target 🙂


Haha, yeah, that sounds like a perfect test target!


In VSCode, the default key binding for ctrl+, points to the settings menu. The number of times people access settings windows is far more less than the number of times s-expressions are executed. I modified calva key bindings to use ctrl+, (ctrl+oem_comma) instead of ctrl+alt+c. I also remapped the workbench settings keybinding to ctrl+, g so that it is still accessible. I left the Paredit settings unmodified. However, they are included in the below gist for reference. All the when clause of "when": "editorTextFocus && editorLangId == 'clojure'" so that their scope is limited to clojure only.