vscode-mermaid-editor icon indicating copy to clipboard operation
vscode-mermaid-editor copied to clipboard

No support for auto-closing quote marks or toggling comments

Open GarbatyGrabarz opened this issue 1 year ago • 0 comments

I have fixed this "issue" myself locally and wanted to share since there is no guide of how to contribute to the project.

  1. package.json > "contributes" > "languages" add a line on the same level as "id", "extensions", and "aliases" (remember about a comma in the line above).
"configuration": "./language-configuration.json"
  1. In the root directory create language-configuration.json:
{
	"comments": {
		"lineComment": "%%"
	},
	"autoCloseBefore": ";:.,=}])> \n\t",
	"autoClosingPairs": [
		{
			"open": "\"", 
			"close": "\"", 
			"notIn": ["string", "comment"]
		},
	],
	"surroundingPairs": [
		[
			"\"",
			"\""
		]
	]
}

GarbatyGrabarz avatar Oct 21 '23 11:10 GarbatyGrabarz