microsoft / microsoft/monaco-editor

[Feature Request] Edit context menu actions/commands (easily)

Open
#4,588 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Context
  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description

I don't see any easy way to move / delete items from the context menu. I'm having issues moving 'Peek Definition' out of the Peek context submenu and into the main navigation menu. Since I only have 1 option inside the peek submenu I find it annoying to even have a submenu for it. Is there an easy way to move this into the navigation menu? Ideally it would go right under Go To Definition.

image

Edit:
I was able to get my desired result by iterating over the peek context menu items to remove the peek menu, then manually adding a new action that just triggers the peek action. There must be a better way?? The playground link shows the hack I had to do.

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAKZBAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw64U3RgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKimARHSWlrTPOQHROITHxmAeFEs9_m3VHdSe7_Etv6WpgzlH4suqcRwO2cnFLtaZLR4F0JFm8KVkxk-4Ch5aQ5cUcW42GDEo1TLlRBA6ZuApl5HQvRce9vFBHq-nuG9Nsza8eABif3xxAynXtZ66klrxMxOOBdRgwC_p0bCI3uVg9_wpXuzaz2FQwYVXRsSY1isaTy1ClRWhGxr6BxU2PeuMmoPennuZ9024KwNVp1y5Lv1UKWmTAdleICWTVujNm5C59_tfpgDVVxRPjzDWNG61yDhHmv_rppNm8E2gGzNCokxsmpAe_QYHp9_2rbpWXWbXOODxIyvfDhTnIO0INzlfTAtJ6Wj-JCRie4998mZTQyMw1D6368CZh61DZIbqNLGjQWQ56jBRIjRXoC3dVqkTYAKjyXy_08RXlCF5LEw9wbu7G6ZyWV4y8HYQXAOqXMBsIgGcaMYwi3abgoCsnE6wLYhbzDiyv5wOgc-yxcTocpXQD_hRGFcKBDHIY6LuPJswMsnejaESXpia2du_R8_DxBfCpb-SefOod70SNIKzP99aCZ3YNTNojnxQCGqGgURjrMt17l-Z849XU-j6pEaQAf4IrAdEf_1uEutwClgWDQwJjgMxGiLEZIJLFHY_zGu1zholxLZmwc8mSibntbTTI9yIdkyqCiIwRyUBJlsEn87lBqWIwUo81oU7UmAMUo9YDgvXTR_N_eX5FhjDM-u_bc_VZjCx0IRJ-o-JblzIw7AZ9nmLpkuQI__kyeLE

Monaco Editor Playground Code

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Monaco Editor Playground and inspect the context-menu items and manually added action described in the issue. Determine whether the existing context-menu customization entry points can support moving or deleting actions across menus. Done means users have a documented, supported way to relocate or remove actions such as Peek Definition without the workaround described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.