Skip to content

Commit

Permalink
[skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Apr 21, 2024
1 parent d5031a9 commit acb6b51
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 8 deletions.
Binary file modified assets/images/social/evaluation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions customizing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2149,23 +2149,32 @@ <h1 id="customizing-calva">Customizing Calva<a class="headerlink" href="#customi
</code></pre></div>
<h2 id="clojure-defaults">Clojure Defaults<a class="headerlink" href="#clojure-defaults" title="Permanent link">#</a></h2>
<p>Calva sets some VS Code settings for all Clojure files. Some of these are needed for Calva to function correctly, which should not be tampered with unless you really know what you are doing, and some of them are convenient defaults. If you add a setting to your <code>settings.json</code> and accept the snippet help you get when you type <code>"[clojure]"</code>, you will get the Calva defaults pasted:</p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nt">&quot;[clojure]&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nt">&quot;[clojure]&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;editor.wordSeparators&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;\t ()\&quot;&#39;:,;~@#$%^&amp;{}[]`&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.autoClosingBrackets&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;always&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.autoClosingQuotes&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;always&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.autoClosingOvertype&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;always&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.autoClosingQuotes&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;always&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.formatOnType&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.autoIndent&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;full&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.formatOnPaste&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.matchBrackets&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;never&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.renderIndentGuides&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.parameterHints.enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nt">&quot;editor.guides.indentation&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.parameterHints.enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editor.unicodeHighlight.allowedCharacters&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot; &quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;꞉&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;editor.foldingStrategy&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;indentation&quot;</span>
<span class="w"> </span><span class="p">}</span>
</code></pre></div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p class="admonition-title"><code>editor.wordSeparators</code></p>
<p>The above <code>editor.wordSeparators</code> setting establish Clojure word boundaries. E.g <code>-</code> is considered to be part of words. This affects what happens when double-clicking symbols and other things. If you want to include <code>-</code> or something else as a word boundary, just add it to the setting.</p>
</div>
<div class="admonition note">
<p class="admonition-title"><code>editor.foldingStrategy</code></p>
<p>To use the folding levels provided by clojure-lsp, set this to <code>auto</code>. Though at the time of this writing there is a bug in clojure-lsp <a href="https://github.com/BetterThanTomorrow/calva/issues/2486">making folding stop working with this setting</a>.</p>
</div>
<h2 id="pretty-printing">Pretty Printing<a class="headerlink" href="#pretty-printing" title="Permanent link">#</a></h2>
<p>Calva's pretty printing mode can be configured a bit. See <a href="../pprint/">Pretty Printing</a>.</p>
<h2 id="calva-highlight">Calva Highlight<a class="headerlink" href="#calva-highlight" title="Permanent link">#</a></h2>
Expand Down
Binary file added images/inspector/calva-inspector-rainbow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/inspector/inspector-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 67 additions & 1 deletion inspector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,21 @@
</span>
</a>

<nav class="md-nav" aria-label="Configuration">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#calvaenableinspectorrainbow-example" class="md-nav__link">
<span class="md-ellipsis">
calva.enableInspectorRainbow example
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -1944,6 +1959,21 @@
</span>
</a>

<nav class="md-nav" aria-label="Configuration">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#calvaenableinspectorrainbow-example" class="md-nav__link">
<span class="md-ellipsis">
calva.enableInspectorRainbow example
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -1991,7 +2021,43 @@ <h2 id="commands">Commands<a class="headerlink" href="#commands" title="Permanen
</ul>
<p>The VS Code Shortcuts editor is a good tool for looking up command IDs and, duh, register custom shortcuts for these commands.</p>
<h2 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">#</a></h2>
<p>There is only one setting for the inspector: <code>calva.autoOpenInspector</code> controls wether the view is revealed as part of connecting the REPL to Calva. It defaults to <code>false</code>.</p>
<p>The settings for the inspector are:</p>
<ul>
<li><code>calva.autoOpenInspector</code>: controls wether the view is revealed as part of connecting the REPL to Calva. It defaults to <code>false</code>.</li>
<li><code>calva.enableInspectorRainbow</code>: when enabled, the inspector items representing collection types will be colored using the theme colors used by VS Code to color bracket pair levels.</li>
</ul>
<h3 id="calvaenableinspectorrainbow-example"><code>calva.enableInspectorRainbow</code> example<a class="headerlink" href="#calvaenableinspectorrainbow-example" title="Permanent link">#</a></h3>
<p>Depending on your theme, enabling the inspector rainbow can make some items not display at all. This is because not all themes provide all (or any) bracket level colorings. You can define the missing ones, or all, levels in your settings JSON file. Here's an example harmonizing the levels coloring with the default <a href="../syntax-highlighting/">Calva Highlight</a> rainbow (included in the example for easy comparison):</p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nt">&quot;workbench.colorCustomizations&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;[GitHub Light Default]&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground1&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#000&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;[GitHub Dark Default]&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground1&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#cccccc&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground2&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#0098e6&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground3&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#e16d6d&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground4&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#3fa455&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground5&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#c968e6&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;editorBracketHighlight.foreground6&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#999&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;terminal.ansiRed&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#ff7a5a&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;calva.highlight.bracketColors&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;#000&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#ccc&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="s2">&quot;#0098e6&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#e16d6d&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#3fa455&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#c968e6&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#999&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;#ce7e00&quot;</span>
<span class="w"> </span><span class="p">],</span>
</code></pre></div>
<p>This is the setting used for the screenshot above. Here's a rainbow-only screenshot:</p>
<p><img alt="A Calva Inspector Rainbow" src="../images/inspector/calva-inspector-rainbow.png" /></p>
<p>Note that with the Calva Highlight rainbow colors, we use a tuple for <code>light</code> and <code>dark</code> theme colors. The VS Code theme color settings do not allow this, so if you need different colors for light and dark themes, you need to specify the exact theme. We do this in the example, since the default Calva Highlight rainbow needs different light/dark colors for the top level brackets.</p>



Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit acb6b51

Please sign in to comment.