Fork me on GitHub
#calva
<
2022-04-18
>
rayat03:04:49

How do I get clj-kondo to stop trying to lint the output.calva-repl file? I'm sure I messed something up, because I'm sure it's not default behavior

1
pez07:04:45

I would try with a minimal project and add things from the misbehaving project in and out to try find the culprit.

pez11:04:29

Dear Calva-friends, latest Calva is now https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.268 • Fix: https://github.com/BetterThanTomorrow/calva/issues/1683https://github.com/BetterThanTomorrow/calva/issues/1498 Thanks to @lilactown for finding the rather stupid limitation to hard require builds in shadow-cljs projects. 🙏 Thanks to @domagala.lukas for figuring out the proper way to reconcile lsp and nrepl providers. 🙏 Happy Clojure coding! ❤️ clojure calva

🎉 10
❤️ 6
calva 2
andyhorng13:04:28

Hi, I am wondering how to evaluate some code snippet when I presse ctrl+s to save the file. I would like to evaluate clip repl reset function to restart components.

pez14:04:40

Hi there! In some thread it was mentioned an extension that lets you create commands that string together other commands. Maybe that would let you do this. So you would then 1. define a Custom REPL Snippet, with a key, say "s" 2. string together the command for saving and the command for executing that snippet. I think the command for saving a file might be workbench.action.files.save (consulting this list https://gist.github.com/skfarhat/4e88ef386c93b9dceb98121d9457edbf). And the command for evaluating that snippet would be calva.runCustomREPLCommand with the args, "s". I have not tried this, but am quite curious if it works or not. 😃 All that said, doing cmd+s ctrl+alt+space s isn't all that much either.

andyhorng14:04:02

Thanks! I will try it asap, and give some feedbacks here.

🙏 1
1
fadrian20:04:43

I have a set of :jvm-opts specified in my deps.edn file. However, when I create a REPL in Calva, these options aren't shown on the java invocation. Are these options actually being passed to the REPL JVM, or do I have to start an external REPL and connect to it to get the flags passed?

bringe20:04:48

I think this should work so long as you’re selecting the alias that contains the jvm-opts when you jack-in. Here’s an example about using reveal with Calva, that uses :jvm-opts: https://calva.io/reveal/#tips-about-font-size

fadrian20:04:36

Are these options shown anywhere when the REPL is started? I'm not seeing them in the command line that starts the REPL. I'm just not certain whether this is an indicator or not.

seancorfield20:04:37

:jvm-opts only work in an alias not at the top-level of your deps.edn file @U0DTU8J83

☝️ 1
❤️ 1
seancorfield20:04:51

(you didn't show your deps.edn but I suspect that is your issue)

seancorfield20:04:51

Depending on what JVM options you are setting, you may be able to tell via (System/getProperties) which will show all of the -D JVM options.

❤️ 1
fadrian21:04:43

@U04V70XH6, you were correct - I fixed the location of the :jvm-opts, putting them in my :dev alias and now I'm getting the option in System/getProperties.

1
1
pez21:04:27

Is it possible to write a clj-kondo linter for this? I recall making the exact same mistake.