Skip to content

Commit 128a4c0

Browse files
committed
deploy: 45f9590
1 parent cb44bfc commit 128a4c0

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

docs/end-users/Configuration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ <h1><a name="Configuration" class="anchor" href="#Configuration">Configuration</
293293
commandline.<br />
294294
Your IDE should respect your settings, however the implementation of that is editor specific. Setting the configuration via
295295
UI might be available depending on the IDE.</p>
296-
<table class="pre"><tr><td><pre><code>version: 7.0.3+6dc12a1c2102c7b879506d86185d357adb8e658d</code></pre></td></tr></table>
296+
<table class="pre"><tr><td><pre><code>version: 7.0.3+45f9590b71e1460f9c50b95b8e6f74bf0bbabe83</code></pre></td></tr></table>
297297
<h2><a name="Usage" class="anchor" href="#Usage">Usage</a></h2>
298298
<p>Inside .editorconfig you can specify the file extension and code location to be use per config:</p>
299299
<pre class="fssnip highlighted"><code lang="fsharp"><span class="pn">[</span><span class="pn">*.</span><span class="id">fs</span><span class="pn">]</span>

docs/end-users/GeneratingCode.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ <h2><a name="Key-motivation" class="anchor" href="#Key-motivation">Key motivatio
299299
<li>It is easier to map your domain model to untyped syntax tree nodes and let Fantomas take care of the actual generation of code.</li>
300300
</ul>
301301
<p><strong>For mercy's sake don't use string concatenation when generating F# code, use Fantomas instead. It is battle tested and proven technology!</strong></p>
302+
<h2><a name="Consider-using-Fabulous-AST" class="anchor" href="#Consider-using-Fabulous-AST">Consider using Fabulous.AST</a></h2>
303+
<p>If you're looking to generate F# code programmatically, you might want to check out <a href="https://edgarfgp.github.io/Fabulous.AST/">Fabulous.AST</a> first.<br />
304+
Fabulous.AST provides a more user-friendly DSL built on top of Fantomas Oak AST, dramatically reducing the boilerplate code required to generate F# code.<br />
305+
It offers a concise and easier-to-use API compared to constructing Oak nodes directly, which can be quite verbose.</p>
306+
<p>The rest of this page documents how to work with Fantomas Oak AST directly, which is useful if you need more control or want to understand the underlying structure.</p>
302307
<h2><a name="Generating-source-code-from-scratch" class="anchor" href="#Generating-source-code-from-scratch">Generating source code from scratch</a></h2>
303308
<h3><a name="Example-syntax-tree" class="anchor" href="#Example-syntax-tree">Example syntax tree</a></h3>
304309
<p>To illustrate the API, lets generate a simple value binding: <code>let a = 0</code>.</p>
@@ -692,6 +697,11 @@ <h3><a name="Updates" class="anchor" href="#Updates">Updates</a></h3>
692697
Key motivation
693698
</a>
694699
</li>
700+
<li class="level-2">
701+
<a href="#Consider-using-Fabulous-AST">
702+
Consider using Fabulous.AST
703+
</a>
704+
</li>
695705
<li class="level-2">
696706
<a href="#Generating-source-code-from-scratch">
697707
Generating source code from scratch

docs/end-users/StyleGuide.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ <h1><a name="Style-guide" class="anchor" href="#Style-guide">Style guide</a></h1
292292
- <a href="https://github.com/G-Research/fsharp-formatting-conventions">G-Research</a></p>
293293
<p>By default Fantomas will format the code according to the Microsoft guide.<br />
294294
The benefit of these guides is that this allows us, as the F# community, to write code in the same manner.</p>
295+
<h2><a name="How-Fantomas-formats-code" class="anchor" href="#How-Fantomas-formats-code">How Fantomas formats code</a></h2>
296+
<p>Fantomas rewrites the entire source text after formatting. Think of it like a word document: Fantomas will re-type your entire text according to its rules in a new file.<br />
297+
It does not modify the original text. This approach ensures complete consistency and adherence to the formatting rules, but it means that all formatting decisions are made by Fantomas according to its opinionated style guide.</p>
295298
<h2><a name="Let-it-go" class="anchor" href="#Let-it-go">Let it go</a></h2>
296299
<p>If you are not used to having a code formatter, you might struggle a bit at first. A part of using a code formatter is about letting go how you wrote things and accept a common consistent style instead.<br />
297300
When embraced, this can truly be <strong>a liberation feeling</strong>. You can play <em>jazz</em> while typing the code, focus on the task at hand and have the same output as if anyone in your team would have written it.</p>
@@ -335,6 +338,11 @@ <h2><a name="Recommendations" class="anchor" href="#Recommendations">Recommendat
335338
Style guide
336339
</a>
337340
</li>
341+
<li class="level-2">
342+
<a href="#How-Fantomas-formats-code">
343+
How Fantomas formats code
344+
</a>
345+
</li>
338346
<li class="level-2">
339347
<a href="#Let-it-go">
340348
Let it go

index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)