microsoft / microsoft/monaco-editor
[Bug] Cannot hide inline edit menu by setting `showInlineEditMenu` to false
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `// This is some existing text`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "javascript",
automaticLayout: true,
});
monaco.languages.registerInlineCompletionsProvider("javascript", {
provideInlineCompletions: async (model, position, context, token) => {
return Promise.resolve({
items: [
{
insertText: "insertion text",
range: {
startLineNumber: position.lineNumber,
endLineNumber: position.lineNumber,
startColumn: position.column,
endColumn: position.column
},
isInlineEdit:true,
showInlineEditMenu: false
}
]
})
},
disposeInlineCompletions: (args) => {}
});
myEditor.updateOptions({
inlineSuggest: {
enabled: true,
mode: "subwordSmart",
showToolbar: "never"
},
});
Reproduction Steps
Type any word to trigger inline edit, hover on the line number and the menu will show up
Actual (Problematic) Behavior
The menu still showed up even I disabled showInlineEditMenu
Expected Behavior
The menu should hide if I disable showInlineEditMenu
Additional Context
The collapse/snooze/setting buttons doesn't work in the standalone editor but seems a vscode feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the linked Monaco Editor Playground reproduction with the provided TypeScript snippet, then focus on the inline edit menu triggered by hovering the line number. Done means setting showInlineEditMenu to false prevents the menu from appearing while preserving the expected inline edit behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100