CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
214 stars 29 forks source link

[Feature Request] MenuRegistry #323

Closed cemalgnlts closed 6 months ago

cemalgnlts commented 6 months ago

Hi,

Here I found MenuRegistry: https://github.com/microsoft/vscode/blob/564d6ae4c7c0e1158d3d6bd15d925a0c4430ecaf/src/vs/workbench/browser/parts/titlebar/menubarControl.ts#L47, but when I try to use it, it can't find it in vs/platform/actions/common/actions.

It also performs a check when adding default menus in this file: https://github.com/microsoft/vscode/blob/564d6ae4c7c0e1158d3d6bd15d925a0c4430ecaf/src/vs/platform/menubar/electron-main/menubar.ts#L292

I thought maybe enabling these two features could help to customize the menu and remove some menu items.

I tried to add at least vs/platform/actions/common/actions but without much success.

cemalgnlts commented 6 months ago

It looks like menubar.ts file for electron.

CGNonofr commented 6 months ago

This library currently bundles only the services designed for the web version of VSCode supporting electron is planned but not really a priority

cemalgnlts commented 6 months ago

Yes, I thought maybe it would work to customize the menu, I realized later that it was electron.

cemalgnlts commented 6 months ago

I found MenuRegistry exported from the package vscode/monaco.

Now I can import it this way.

import { MenuRegistry, MenuId } from "vscode/monaco";

Thanks.