Skip to main content
A plugin’s settings show in the Settings dialog with the others, are searchable, and are saved in the scope the user chooses.

Declare in the manifest

The key is prefixed with the plugin’s name: this one is @acme/counter.step.

Types

Scopes

A setting’s value is the one of the highest scope that has it. A project file cannot force a setting that does not allow the project scope: such values are ignored.

Read and follow

settings.inspect(key) gives the value in each scope.

Write

Writing validates the value, and fails for a scope the setting does not allow.

Declare in code

For a setting whose type the manifest vocabulary cannot express, define it with a zod schema and register it:

A page of your own

When a list of rows is not the right editor (the keyboard shortcuts page, for example), contribute a page to SETTINGS_PAGES. The page gets the dialog’s pending changes: what it sets is saved when the user presses Apply or OK, like every other setting.
In the page, page.value(key) reads a setting with its pending change, page.set(key, value, scope) changes it, and page.revision is an observable bumped on every change.