-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Right now you can globally tell VS Code / Positron to use the visual editor by default for ALL qmd documents with this setting:
"workbench.editorAssociations": {
"*.qmd": "quarto.visualEditor"
}This is officially supported as the way for a user to set their global preference. It's the reason we set priority: "option" for our custom editor in package.json
"customEditors": [
{
"viewType": "quarto.visualEditor",
"displayName": "Quarto Visual Editor",
"selector": [
{
"filenamePattern": "*.{md,qmd}"
}
],
"priority": "option"
}
],
https://code.visualstudio.com/api/references/contribution-points#contributes.customEditors
i.e. we don't forcibly take over qmds and make them open in visual mode, but a user can use this editor association option to opt in to this global override if they always want visual mode.
This is a super cool feature, but it's super hard to find!
I vote we make an ephemeral command that the user can call as something like Quarto: Set Editor Default who's sole job would be to follow up with a quick pick where the user can select either Source or Visual, and then based on their answer we set this editorAssociation option for them. It's possible we should also ask them if they want it set at a User or Workspace level.
Note that I do not think we should make this a quarto level option. That leaves the door open for the quarto option to get out of sync with the editor association option, like with manual editing of settings you can confusingly end up with this if we did an option:
"quarto.editorDefault = "source",
"workbench.editorAssociations": {
"*.qmd": "quarto.visualEditor"
}and that seems bad. So having it as a command that just sets editorAssociations seems like a better way to do this.
