Files
orca/src/shared/editor-language
Neilanddavidwis b5f9e06164 fix(editor): highlight Zig source and diffs (#32705)
* fix(editor): add bounded Zig syntax highlighting

Recognize .zig files and load the existing pinned Shiki Zig grammar through
the lazy TextMate provider. Map its scopes to stock Monaco theme categories
while preserving the shared tokenizer state and per-line bounds. Keep .zon
and formatting outside this lexical-only change.

Reuse the optional scope-mapping hook reviewed in Haskell PR #25411 and
its refreshed candidate 12908d0341,
retaining the original contribution credit from #25315. Ship the existing
grammar package MIT notice in renderer public assets for desktop and web.

Requested by @thinkAfCod in issue #11313. This addresses highlighting only;
it does not close the formatting portion of the issue title.

Co-authored-by: davidwis <davidwis000@gmail.com>

* fix(build): serve Zig grammar notices through allowed assets

Move the unchanged Shiki notices beneath assets/ and reference both files
with relative HTML metadata links. Preserve reverse-proxy prefixes and let
the existing projection and serving allowlists accept the browser client.
Do not expand either allowlist.

Exercise real Vite output, projection, manifest validation, and static HTTP
serving at root and /orca paths. Follow the relative-assets notice strategy
used by the coauthored Haskell adaptation and retain its contribution credit.

Co-authored-by: davidwis <davidwis000@gmail.com>

* test(editor): verify Zig source and diff highlighting

* chore(editor): drop Zig grammar notice assets

Zig grammar comes from the existing shiki dependency (already shipped via
syntax-highlighter's bundled-language loader), so no separate notice is needed.

---------

Co-authored-by: davidwis <davidwis000@gmail.com>
2026-10-24 17:48:38 -07:00
..