Repository navigation
Description
This is a rephrasing of #138525.
We are working on a custom-editor extension for .custom.md files that allows interacting with markdown outside the IDE's normal text editor, including buttons, checkboxes, and paragraphs that morph into textareas when you click them.
The .custom.md format is normal markdown format, but our vscode extension overlays it with a webview so you can interact with checkboxes, plus buttons, and accept buttons to modify the underlying file.
One point of frustration with our custom editor is merging/diffing. While we absolutely want this editor to be the default editor for .custom.md files, it does not currently support merging/diffing very well.
So, for merging/diffing, we would strongly prefer to use the text editor by default. However, there does not appear to be such an option. Defaults are controlled by contributes.customEditors.priority in package.json. For example:
"contributes": {
"customEditors": [
{
"viewType": "custom-markdown.editor",
"displayName": "Custom Markdown Editor",
"selector": [
{
"filenamePattern": "*.custom.md"
}
],
"priority": "default"
}
]
}
priority: default causes edit, diff, and merge to use the custom editor by default. priority: option causes them to use the text editor by default. We feel it would be too inconvenient/unexpected to make users select the custom editor each time they want to edit a .custom.md file.
I tried a fair amount of workarounds, like:
"configurationDefaults": {
"workbench.editorAssociations": { "*.custom.md": "custom-markdown.editor" }
},
"customEditors": [
{
"viewType": "custom-markdown.editor",
"displayName": "Custom Markdown Editor",
"selector": [
{
"filenamePattern": "*.custom.md"
}
],
"priority": "option"
}
],
But nothing resolved the issue. A proposed alternative would be to replace the priority option with:
"editPriority": "default",
"diffPriority": "option",
"mergePriority": "option"
Would it be possible to add this feature? Thanks!
Activity
Add proposal for custom editor diff/merge priority
mjbvz commentedon May 8, 2026
Added this in #315321 but reopening as right now this is still an API proposal. The current names are
diffEditorPriorityandmergeEditorPriorityPlease give it a try and let me know if you run into an issues!
Rework custom editor diff/merge contribution points
32 remaining items
hediet commentedon Jul 27, 2026
Actually, let's keep this issue open to track the finalization of per-editor-type priorities.
Currently proposed
customEditors.priorityfeatureAllow extensions to declare custom-editor priority per editor mode:
Values:
default— automatically use the custom editor in this mode.option— offer it as an alternative. If the user sets it as default in oneoptionmode, all otheroptionmodes are opted in too.explicit— do not include it in cross-mode opt-in; require an explicit association for this mode.This lets extensions distinguish well-supported modes from degraded ones while preserving user choice. Existing scalar values remain compatible, with diff mode treated as
explicitby default.Finalizes customEditorPriority proposal. Closes #292379 (#329002)
Merge remote-tracking branch 'origin/main' into pr-328876
Munir786-dot commentedon Aug 21, 2026
#292379