Supported by html/elements and html/attributes, allows to inject the specified language into HTML element text or HTML attribute value. With enableByDefault attribute you can choose whether the Web Types file should be contributed to Web Symbols scope by default, or only if an NPM package with the same name is present in the project. ![]() To point an IDE to its location use extension point and pass the file location in source attribute value. You can ship Web Types JSON with your IDE plugin. The property accepts a string or an array of strings with relative paths to Web Types files within the project. In your JavaScript projects in package.json files you can specify web-types property similarly to the NPM package. The property accepts a string or an array of strings with relative paths to Web Types files shipped with the package. The IDE will automatically discover any Web Types shipped with the NPM library and specified in the web-types property of package.json. Web Types can currently be discovered by the IDE in following ways: NPM All the Web Types contributions are mapped 1-1 and custom properties are accessible through properties property. E.g:Įach Web Types contribution is represented in the Web Symbols framework by a PsiSourcedWebSymbol object. To use a different namespace for sub-contributions, nest symbol kind JSON property name under a js, css or html property. Such contributions will be assigned to the same namespace as the parent contributions. If a contribution’s JSON property’s value is an object value or an array of objects, it is treated as a list of sub-contributions. A custom property is a JSON property, whose value is of a simple type (string, number or boolean), or is an array of simple types. Contributions in addition to standard properties can define sub-contributions and custom properties. A symbol contribution should have at least a name. Reference for the most important symbol kinds defined by frameworks supported by IDEs is below.Įach symbol kind name property of a namespace object is an array of symbol contributions. Each framework should define a set of custom symbol kinds if needed. ![]() For instance a Vue directive should be of the kind vue-directives. The kind of symbol should relate to its role. Some symbol kinds are predefined and directly supported by IDE (see Direct Support for reference). The namespace object contains symbol kind names listed as properties. ![]() Currently only html, css or js namespaces are allowed, however in the future this limitation will be lifted to support Web Types for other technologies. The schema contains detailed documentation for all the JSON entities.ĭirectly under contributions property are listed namespaces with their contributions. It should also include $schema property which can be either or. The Web Types file should, at minimum, contain name, version and contributions properties. "description": "A custom attribute of `my-element`"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |