nanoforge.manifest.json. Start one with the CLI:
--watch runs, each save of the manifest changes the editor at once. tooling/example-theme in the editor’s repository is a complete example: a theme, an icon and an icon theme.
A theme
id: unique among installed themes. The built-innanoforge-darkandnanoforge-lightcan’t be replaced: a theme whose id is already taken is left out, and named in the Console.extends: the theme it starts from,nanoforge-dark,nanoforge-lightor another plugin’s theme. Give only what changes. A theme that extends none giveskind(darkorlight) and every color.- No
entry: a theme has no code. keywords: ["theme"]lists it under Get more themes once it is in the registry.
#rrggbb, rgb(), oklch(). A value never holds ;, {, }, \, <, >, @, /*, url() or an image, and closes its brackets and quotes: a theme brings no files but its icons. A var() works in the editor’s own UI, but the code editor and the contrast check can’t read it: give the code editor’s colors (surface, raised, text, accent, selection…) as plain colors, or it keeps its own for them. An unknown token is refused, by name, in the Console (Invalid contributes.themes of "@acme/forest").
Colors
Code colors (syntax)
keyword, string, number, comment, type, variable, regexp, delimiter. Those you leave out keep the code editor’s own.
Tokens
font-ui, font-code, radius-control, radius-float. A font must be one the computer has, or a web font loaded another way: the editor loads only its own.
The Density setting (compact, normal, comfortable) is the user’s, not the theme’s.
Contrast
When a theme is applied, the editor checks it as WCAG does: the three text colors need 4.5:1 on each background (bg, surface, raised, sunken), border-strong 3:1, on-accent 4.5:1 on accent, and selection-text on selection. What falls under is named once in the Console:
Icons
contributes.icons adds icons by name, as SVG files of the plugin. Panels, menus and file icons use them by their name.
nanoforge can’t be replaced.
icons: any icon of the editor by its name (folder,play,settings, the panels’ icons…), or new names forfilesandfolders.filesandfolders: patterns of the Files panel, ahead of every other plugin’s while the icon theme is chosen.- A path is a relative
.svgfile inside the plugin: never.., an absolute path or another site. - An SVG is drawn in the color of the text around it (a CSS mask): draw it in one color, its shape only. It is never put in the page, so it can’t run scripts.