nanoforge.manifest.json: its name, what it adds to the editor, and when to load it;- a client entry (
index.js): code that runs in the editor’s page; - optionally a worker entry (code analysis and code generation) and a server entry (code that runs in the editor’s server);
- its styles and assets.
Where plugins live
The editor looks in four places. When the same plugin is in several, the later one in this table is used.
Settings › Plugins lists every plugin with its source and state, lets you turn one off, and installs plugins from the marketplace.
A project plugin’s server entry only runs in a local editor, never in a hosted one.
http:, https:, ws:, wss:).
How a plugin is loaded
- The editor reads every manifest. Everything a manifest declares in
contributes(commands, menus, panels, settings, shortcuts) is in place before any plugin code runs. - A plugin’s code is fetched and
activateis called when one of its activation events happens: a panel of the plugin is shown, one of its commands runs, or at startup. - When the plugin is turned off or replaced, everything it added through
context.subscriptionsis removed.
What a plugin can import
Only the SDK:@nanoforge-dev/editor-sdk: services, commands, settings, history, code, runtime;@nanoforge-dev/editor-sdk/ui: panels, menus, the status bar, and the editor’s own components;@nanoforge-dev/editor-sdk/worker: types for worker entries.
Next
Create your first plugin
nf create plugin, run it in the editor, change it.Manifest reference
Every field of
nanoforge.manifest.json.SDK
The activation context and the editor’s services.
Extension points
Every place a plugin can add something.