What is the correct way to add an option to the VSCode Settings Menu (editing VSCode's source)

Viewed 21

(not sure if I asked this earlier somewhere, but I can't find it)

Earlier I found out how to create a usable entry on the VSCode settings menu (also usable in settings.json) by editing these VSCode source files:

  • vscode/src/vs/editor/common/config/editorOptions.ts

    • Adding a variable in export interface IEditorOptions.
    • Adding an enum in export const enum EditorOption.
    • Adding an item in export const EditorOptions.
  • vscode/src/vs/editor/common/standalone/standaloneEnums.ts

    • Adding an enum to export enum EditorOption.

I don't know if that's the correct way, I just copied other options.

I hadn't yet figured out how to access the new entry's value from the function I wanted to use it in (I had already implemented the functionality, just without the option).

I then got sidetracked and forgot about this.


Now when I try to build it I'm getting an error (it builds fine without the changes).

running yarn --cwd <mydir> run gulp vscode-linux-x64 gives Error: monaco.d.ts is no longer up to date. Please run gulp watch and commit the new file.

I'm not sure exactly how I'm supposed to run gulp watch here. I don't know anything about yarn or gulp (I'm just using the VSCode contributor instructions), and running yarn --cwd <mydir> run gulp watch doesn't fix the problem.

It sounds like vscode/src/vs/monaco.d.ts being read by the build process before being written/updated, because its timestamp changes. I'm not sure if that's my fault and/or if it's a red herring.


Does anyone know what I should be doing here? Has anyone here modified the settings menu?

Is there any documentation out there for modifying the settings menu? (I had a look, didn't find anything).

0 Answers
Related