Repository navigation
Conversation
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
from
October 19, 2026 21:42
cbe1dea to
42f40c5
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
2 times, most recently
from
October 21, 2026 06:34
bbec1a5 to
65098ae
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
2 times, most recently
from
October 21, 2026 12:23
111ab32 to
b04942d
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
from
October 21, 2026 12:23
65098ae to
4d4c87c
Compare
nwparker
marked this pull request as ready for review
October 21, 2026 12:24
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
from
October 21, 2026 20:10
b04942d to
c50d65b
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
from
October 21, 2026 20:10
4d4c87c to
7aa0734
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
from
October 24, 2026 11:43
c50d65b to
00f479d
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
3 times, most recently
from
October 25, 2026 05:23
1815b6e to
bf08223
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
2 times, most recently
from
October 26, 2026 12:04
7452b90 to
eb24515
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
2 times, most recently
from
October 26, 2026 12:32
20e19c6 to
ad09422
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
2 times, most recently
from
October 28, 2026 04:57
0d68d0b to
e835a1e
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
from
October 28, 2026 04:57
ad09422 to
48cb49b
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
from
October 28, 2026 05:30
e835a1e to
086c8f0
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
from
October 28, 2026 05:30
48cb49b to
65e407c
Compare
A plugin can contribute up to 16 syntaxes: a TextMate grammar, optional language configuration, and the file extensions and names it claims. Main validates every grammar when the plugin is approved (shape, scope, size, nesting) and lists only the file associations. A language's grammars cross IPC only when a matching file opens, and includes must resolve inside the same plugin. Catalog releases can declare syntax.
Files Orca shows as plain text use a matching plugin syntax. Its grammar compiles once in a worker that stays warm between edits and runs under core's per-line limits; a worker that stops reporting progress or crashes is terminated, the language stays plain, and the plugin card says so. Tokens reach Monaco as semantic tokens, so Monaco asks only for models shown in an editor, keeps one request per model, and keeps painting the previous colors, shifted by edits, until the new pass lands. Plugin languages borrow ids from a pool of fixed Monaco languages, counted by the editors using them; a language no editor uses moves its models back to plain text, and the least recently used idle slots are reused first.
An official-style data plugin with the upstream Gleam TextMate grammar (Apache-2.0, provenance and license alongside) and language configuration. A test installs it through the production inspection and loads it through the syntax registry.
…view The preview's Includes line named only language packs, commands, shortcuts, VM recipes, panels and events, so a theme or syntax pack read as "Manifest metadata only".
…x id A grammar that failed in revision A kept the plugin card flagged after revision B replaced it. Failures are now keyed by id@revision, matching the runtime slots, and dropped when the installed list no longer contains that revision.
nwparker
force-pushed
the
nwparker/plugins-v2-7-syntax-packs
branch
from
October 28, 2026 10:53
65e407c to
58bfd00
Compare
nwparker
force-pushed
the
nwparker/plugins-v2-6-settings-ux
branch
from
October 28, 2026 10:53
086c8f0 to
26d649b
Compare
Contributor
Author
|
Folded into #35470 (Plugin Alpha), which lands the rest of the plugin stack in one PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Plugins can now teach Orca's editor to color a new language. If Orca shows a file as plain text and an installed plugin knows its file type, the editor highlights it right away, with no reload. A broken or very slow grammar can't freeze Orca; the file just stays plain.
What Changed
Before: only Orca's built-in languages were highlighted. Any other file type was plain text.
After:
How it works:
plugin-content-pack-contributions.ts,plugin-manifest.ts):contributes.syntaxes, at most 16 per plugin. Each entry is{ id, label, scopeName, path, configuration?, extensions, filenames }. Ids and scope names must be unique.src/shared/plugins/plugin-syntax-artifact.ts,src/main/plugins/plugin-syntax-registry.ts):#keyor siblingscope#keyinside the plugin must resolve, or the plugin card shows the error. An include of an outside scope, such as an embeddedsource.js, is allowed and resolves to nothing, so that region stays plain.plugins:loadSyntaxreturns a language's grammars only when a matching file opens.plugin-grammar.worker.ts,plugin-grammar-tokenization.ts,plugin-grammar-worker-client.ts):plugin-syntax-engine.ts,plugin-syntax-token-legend.ts,plugin-syntax-editor-options.ts):type,number,string,comment,keyword,keyword.flow,delimiter,tag, and so on). Each token takes the innermost scope that maps to one, skipping punctuation, so a comment's//and a string's quotes share its color. Function and variable names stay plain, as in Orca's own languages.getValueLength()/getLineCount()before any text is read.plugin-syntax-slot-pool.ts,plugin-syntax-runtime.ts):use-plugin-syntax-language.ts,plugin-syntax-editor-options.ts):MonacoEditor,DiffViewerandDiffSectionBodyresolve their language through this one hook. After mounting, they put kept models back on that language, because the editor library reuses a kept model without resetting it.examples/plugins/orca-gleam-syntax): an official-style data pack with the upstream Gleam grammar (Apache-2.0, provenance and license alongside).syntax. Docs are indocs/reference/plugin-syntax.md.Why
Linked Issue
None. This is part of the plugin platform rework (maintainer change).
Visual Proof
Screenshots from a hidden dev window (
ORCA_BACKGROUND_LAUNCH=1, isolated profile, mock keychain), captured over CDP:plugin-syntax-smoke.spec.ts):Testing
Unit tests:
plugin-syntax-artifact.test.ts).plugin-syntax-registry.test.ts).plugin-example-gleam-syntax.test.ts).plugin-grammar-tokenization.test.ts).plugin-grammar-worker-client.test.ts).plugin-syntax-token-legend.test.ts).plugin-syntax-slot-pool.test.ts).plugin-syntax-packs.test.ts).Local suites: 41,330 tests across plugins, shared, IPC, persistence, renderer lib/store/editor/settings/hooks and preload pass.
tc:node,tc:web, oxlint,check:code-quality:changedand localization checks are clean.End-to-end: all plugin specs pass locally.
plugin-syntax-smoke.spec.tsuses the Gleam pack. It checks the actual comment, type and number colors against the built-in themes, switches tabs away and back (this check fails with the remount fix removed), then updates and disables the pack.Platforms: macOS locally. This draft skips most CI jobs, so Linux and Windows aren't covered yet.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). Targeted suites,tc:node,tc:web, oxlint, the change-quality gate and plugin e2e pass locally; fullpnpm lintnot run.