カスタムデータ拡張機能

カスタム データ形式を使用すると、拡張機能の開発者はコードを書くことなく、VS Code の HTML / CSS 言語サポートを簡単に拡張できます。

拡張機能でカスタム データを使用するための 2 つの貢献ポイントは次のとおりです。

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

例えば、拡張機能の package.json にこのセクションを含めると、

{
  "contributes": {
    "html": {
      "customData": ["./html.html-data.json"]
    },
    "css": {
      "customData": ["./css.css-data.json"]
    }
  }
}

VS Code は両方のファイルで定義された HTML/CSS エンティティを読み込み、それらのエンティティに対して自動補完やホバー情報などの言語サポートを提供します。

custom-data-sample は、microsoft/vscode-extension-samples でご覧いただけます。

© . This website operates independently and is not affiliated with or endorsed by Microsoft. All brand names, logos, and trademarks are the property of their respective owners.