Fork me on GitHub
#calva
<
2020-05-21
>
levitanong09:05:39

Hallo @pez! Writing my own custom cljs repl sequence. It’s based off of clojure cli running shadow-cljs (instead of the other way around) and I’ve got it working, except I want to parametrize the build id. Having trouble with that though, as the current built-in shadow-cljs code has a format that’s slightly different from what’s documented. e.g. it’s a map with build and repl keys, and the string is defined with a backtick. There seems to be some string replacement going on. Is there some other documentation for this?

pez09:05:50

Only the code, I am afraid. Which could need some fixes, of course.

pez09:05:21

I'm going afk now, but will read up later today in case you have found more clues. 😃

Manuel Ceron14:05:53

Hi everyone, I'm not sure if this is a new feature, or an old one and I just missed it some how. But showing the stacktraces is absolutely fantastic! As a Clojure beginner this has truly improved my experience a lot. Thanks a lot for this! ❤️

❤️ 8
calva 20
scaturr18:05:53

Is there a way to run a repl command on save?

bringe19:05:23

I don't think there is a hook for this, unfortunately. I don't know your use case, but there is at least the Eval on Save setting.

bringe19:05:03

Actually, if you put some code at the top level of the file in question, and enabled Eval on Save, this probably would do that, but of course, that's a per file use and requires the code to be in the file, so it's not very portable.

bringe19:05:45

If by "repl command" you mean some Calva command related to the repl, then also no, I don't think so, but then what I said above does not apply either.

pez05:05:17

Thinking out loud: Maybe it can be added as a config to Custom REPL commands/snippets? runOnSave, or something like that. We would need to invent a way to pass the file and/or ns along as an argument to make it flexible. I can see how this would be good for some workflows.

bringe15:05:41

Yeah, definitely achievable