Custom Data Extension

Custom Data format allows extension authors to easily extend VS Code’s HTML / CSS language support without having to write code.

The two Contribution Points for using custom data in an extension are:

  • contributes.html.customData
  • contributes.css.customData

For example, by including this section in an extension’s package.json:

  1. {
  2. "contributes": {
  3. "html": {
  4. "customData": ["./html.html-data.json"]
  5. },
  6. "css": {
  7. "customData": ["./css.css-data.json"]
  8. }
  9. }
  10. }

VS Code will load the HTML/CSS entities defined in both files and provide language support such as auto-completion and hover information for those entities.

You can find the custom-data-sample at microsoft/vscode-extension-samples.