<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent activity in Calva</title>
<link>https://ask.clojure.org/index.php/activity/tools/calva</link>
<description></description>
<item>
<title>Answer edited: How can I make Calva use a relative path when loading a file in cljs?</title>
<link>https://ask.clojure.org/index.php/14129/how-can-make-calva-use-relative-path-when-loading-file-in-cljs?show=14133#a14133</link>
<description>&lt;p&gt;Hello. I don't think there is a way to configure that currently. You are welcome to file an issue about it. We can probably make this work.&lt;/p&gt;
&lt;p&gt;Meanwhile.&lt;/p&gt;
&lt;p&gt;Is shadow-cljs or Figwheel managing the loading of the project? If so, saving the file should load it .&lt;/p&gt;
&lt;p&gt;Also, I think you most often get away with selecting the whole file and &lt;strong&gt;evaluate selection&lt;/strong&gt;.  You can configure a keyboard shortcut like this to give yourself something quite similar to the command that doesn't work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  {
    &quot;command&quot;: &quot;runCommands&quot;,
    &quot;key&quot;: &quot;ctrl+alt+c ctrl+alt+enter&quot;,
    &quot;args&quot;: {
      &quot;commands&quot;: [
        &quot;editor.action.selectAll&quot;,
        &quot;calva.evaluateSelection&quot;,
        &quot;cursorUndo&quot;
      ]
    }
  },
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can add a &lt;code&gt;when&lt;/code&gt; clause to it to only operate on cljs files. I think it would be &lt;code&gt;resourceExtName == .cljs&lt;/code&gt;.  See &lt;a rel=&quot;nofollow&quot; href=&quot;https://code.visualstudio.com/api/references/when-clause-contexts&quot;&gt;https://code.visualstudio.com/api/references/when-clause-contexts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That said, it's probably fine to let it load Clojure files this way as well. You can copy the existing &lt;code&gt;when&lt;/code&gt; clause from the command in the in Keyboard Shortcuts UI.&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14129/how-can-make-calva-use-relative-path-when-loading-file-in-cljs?show=14133#a14133</guid>
<pubDate>Thu, 26 Sep 2024 05:44:47 +0000</pubDate>
</item>
<item>
<title>Commented: Refresh/Reload deps.edn changes in Calva + VS Code in WSL Ubuntu</title>
<link>https://ask.clojure.org/index.php/14054/refresh-reload-deps-edn-changes-in-calva-vs-code-in-wsl-ubuntu?show=14062#c14062</link>
<description>There is no command in Calva for reloading the project. With Clojure 1.12, add-libs can be used for loading a &amp;nbsp;library into the project dynamically. Generally it is what you tried to do, restarting the REPL. But of course, the project files need to be fine . I see that you found the issue there.</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14054/refresh-reload-deps-edn-changes-in-calva-vs-code-in-wsl-ubuntu?show=14062#c14062</guid>
<pubDate>Tue, 20 Aug 2024 05:46:58 +0000</pubDate>
</item>
<item>
<title>Answer edited: Is there a way to place the elements of a collection vertically with Calva?</title>
<link>https://ask.clojure.org/index.php/12126/there-way-place-elements-collection-vertically-with-calva?show=12133#a12133</link>
<description>&lt;p&gt;Calva has a command &lt;strong&gt;Calva: Replace Current Form (or Selection) with Pretty Printed Form&lt;/strong&gt; that does this. Your &lt;a rel=&quot;nofollow&quot; href=&quot;https://calva.io/pprint/&quot;&gt;pretty printer&lt;/a&gt;  settings need to have a narrow print width.&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12126/there-way-place-elements-collection-vertically-with-calva?show=12133#a12133</guid>
<pubDate>Thu, 06 Oct 2022 06:18:36 +0000</pubDate>
</item>
<item>
<title>Answer selected: Calva: Is there an option to add additional parameters when using &quot;jack-in&quot; in Calva</title>
<link>https://ask.clojure.org/index.php/11894/calva-there-option-additional-parameters-when-using-calva?show=11895#a11895</link>
<description>&lt;p&gt;Calva does not have configuration designed for setting Java options. That doesn't mean you don't have options, though. First some general background:&lt;/p&gt;
&lt;p&gt;You can provide these via &lt;code&gt;:jvm-opts&lt;/code&gt; on an alias in &lt;code&gt;deps.edn&lt;/code&gt;, or via the environment variable &lt;code&gt;JAVA_TOOL_OPTIONS&lt;/code&gt;. Something like this would be an equivalent command line invokation (assuming something Unix-like):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;JAVA_TOOL_OPTIONS='-Dtrace -Dguardrails.enabled=true' clj -A:dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You then can use the command &lt;strong&gt;Calva: Copy Jack-in Command Line&lt;/strong&gt; to Clipboard, to get the REPL started in a Calva compliant way, then use &lt;strong&gt;Calva: Connect to a Running REPL in your Project&lt;/strong&gt;, to connect to it.&lt;/p&gt;
&lt;p&gt;However, you can also use Jack-in. Calva has a settings &lt;code&gt;calva.jackInEnv&lt;/code&gt;,  where you can provide this environment variable, and Jack-in should work.&lt;/p&gt;
&lt;p&gt;Yet another, Jack-in compatible, option  is to add this in your &lt;code&gt;deps.edn&lt;/code&gt;. Something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:aliases {:dev {:jvm-opts [&quot;-Dtrace&quot; &quot;-Dguardrails.enabled=true&quot;]}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You could then specify the &lt;code&gt;:dev&lt;/code&gt; alias at Calva Jack-in.&lt;/p&gt;
&lt;p&gt;I think I would go with the last one, as it makes the project config portable and easy for others to use.&lt;/p&gt;
&lt;p&gt;Hoping this helps! Here is an &lt;a rel=&quot;nofollow&quot; href=&quot;https://calva.io/jack-in-guide/&quot;&gt;article about Calva Jack-in&lt;/a&gt; that probably is good to read.&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11894/calva-there-option-additional-parameters-when-using-calva?show=11895#a11895</guid>
<pubDate>Wed, 18 May 2022 12:23:53 +0000</pubDate>
</item>
<item>
<title>Recategorized: How to get Clojurescript REPL in Calva (Lein + Figwheel main)</title>
<link>https://ask.clojure.org/index.php/11759/how-to-get-clojurescript-repl-in-calva-lein-figwheel-main?show=11759#q11759</link>
<description>&lt;p&gt;Hi, I trying to setup editor for Clojure, currently struggling with Calva. I have fullstack project (cljs via Figwheel main) and whe I run repl (jack-in) then both repls get started (Lein + Figwheel Main config), but I cant switch to cljs repl, geting error &quot;Cannot read properties of null (reading 'switchNS')&quot;&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11759/how-to-get-clojurescript-repl-in-calva-lein-figwheel-main?show=11759#q11759</guid>
<pubDate>Tue, 17 May 2022 14:53:20 +0000</pubDate>
</item>
<item>
<title>Recategorized: Calva: Is there a way to evaluate a whole file?</title>
<link>https://ask.clojure.org/index.php/11892/calva-is-there-a-way-to-evaluate-a-whole-file?show=11892#q11892</link>
<description>&lt;p&gt;Beside selecting the whole file and then evaluating the selection, can I evaluate the whole file in a more convenient way?&lt;/p&gt;
&lt;p&gt;Adapted from questions asked in the &lt;code&gt;#calva&lt;/code&gt; channel at &lt;a rel=&quot;nofollow&quot; href=&quot;http://clojurians.net/&quot;&gt;Clojurians Slack&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11892/calva-is-there-a-way-to-evaluate-a-whole-file?show=11892#q11892</guid>
<pubDate>Tue, 17 May 2022 14:52:40 +0000</pubDate>
</item>
</channel>
</rss>