Finch 2.5.0: docs (EN, PL), Kate and VS Code for the new features

- cheat sheets, technicians' and engineers' guides: "\(x)", test blocks, finch fmt, finch.toml,
  the build cache, the chain of calls, threads and atomics, C++/Rust/Android, struct #defines,
  passing structs, why there is no warning for big copies
- Kate (version 4) and VS Code: code inside text, test, min/max/abs/clamp/assert/atomic_...
- finch.toml's name is used only for its entry; other files of the project keep their own name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GzNP6r8dg6WDxUVZy8wjL
This commit is contained in:
Nexoniarz 2026-10-29 11:34:41 +01:00
commit bb9702aeba
16 changed files with 778 additions and 60 deletions

View file

@ -5,7 +5,7 @@
Install: copy to ~/.local/share/org.kde.syntax-highlighting/syntax/finch.xml
(or run editors/kate/install.sh), then restart Kate.
-->
<language name="Finch" version="3" kateversion="5.0" section="Sources" extensions="*.fch"
<language name="Finch" version="4" kateversion="5.0" section="Sources" extensions="*.fch"
mimetype="text/x-finch" indenter="cstyle" author="The Finch authors" license="Apache-2.0">
<highlighting>
<list name="keywords">
@ -71,6 +71,17 @@
<item>new</item>
<item>free</item>
<item>error</item>
<item>min</item>
<item>max</item>
<item>abs</item>
<item>clamp</item>
<item>assert</item>
<item>atomic_add</item>
<item>atomic_sub</item>
<item>atomic_load</item>
<item>atomic_store</item>
<item>atomic_swap</item>
<item>atomic_cas</item>
</list>
<contexts>
@ -85,6 +96,8 @@
<DetectChar char="'" attribute="Char" context="Char"/>
<WordDetect String="fn" attribute="Keyword" context="FunctionName"/>
<RegExpr String="\btest(?=\s*&quot;)" attribute="Keyword"/>
<RegExpr String="(?&lt;=\s)as(?=\s+[A-Za-z_])" attribute="Import"/>
<WordDetect String="struct" attribute="Keyword" context="StructName"/>
<keyword String="control" attribute="Control Flow"/>
<keyword String="imports" attribute="Import"/>
@ -134,16 +147,30 @@
</context>
<context name="String" attribute="String" lineEndContext="#pop">
<RegExpr String="\\\(" attribute="Escape" context="Interpolation"/>
<RegExpr String="\\[ntr0\\&quot;']" attribute="Escape"/>
<RegExpr String="\\." attribute="Error"/>
<DetectChar char="&quot;" attribute="String" context="#pop"/>
</context>
<context name="LongString" attribute="String" lineEndContext="#stay">
<RegExpr String="\\\(" attribute="Escape" context="Interpolation"/>
<RegExpr String="\\[ntr0\\&quot;']" attribute="Escape"/>
<StringDetect String="&quot;&quot;&quot;" attribute="String" context="#pop" endRegion="LongString"/>
</context>
<!-- "hp \(hp + 1)": code inside text, up to the ) that closes \( -->
<context name="Interpolation" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char=")" attribute="Escape" context="#pop"/>
<DetectChar char="(" attribute="Symbol" context="InterpolationParen"/>
<IncludeRules context="Normal"/>
</context>
<context name="InterpolationParen" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char=")" attribute="Symbol" context="#pop"/>
<DetectChar char="(" attribute="Symbol" context="InterpolationParen"/>
<IncludeRules context="Normal"/>
</context>
<context name="Char" attribute="Char" lineEndContext="#pop">
<RegExpr String="\\[ntr0\\&quot;']" attribute="Escape"/>
<DetectChar char="'" attribute="Char" context="#pop"/>