vscode: Default Custom Editor prompt doesn't show custom editor options for filetypes associated with ViewType and Filename Pattern

  • VS Code Version: 1.56
  • OS Version: Windows 10

Steps to Reproduce:

  1. Download Depot from Extension Marketplace Depot uses .dpo by default to display its custom editor.
  2. Associate a .json file with Depot by using { “viewType”: “depot.data”, “filenamePattern”: “*.json” } in settings.json
  3. When you try to open a json file for editing, Depot does not appear as an option.

I’m assuming because by Default Depot is setup only to use .dpo? Or is JSON special?

Does this issue occur when all extensions are disabled?: No (due to extension dependency)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Well "priority": "option" just means it will show up as an option in the Reopen Editor With.... command or the Open With... explorer context menu. This doesn’t mean that there is a prompt for it. The user only gets prompted on defaults.

If depot can truly handle any file type I would suggest a package.json of this regardless of what the changes are decided here.

"customEditors": [
	{
		"viewType": "depot.data",
		"displayName": "Depot Data",
		"priority": "default",
		"selector": [
			{
				"filenamePattern": "*.{dpo,depot}"
			}
		]
	},
	{
		"viewType": "depot.data",
		"displayName": "Depot Data",
		"priority": "option",
		"selector": [
			{
				"filenamePattern": "*"
			}
		]
	}
],

This will say for all non *.depot or *.dpo make the Depot Editor an option. That way the user can also see the editor in the Reopen Editor With... quickpick.