Skip to content

[html] allow extensions to provide computed custom data #135459

Closed
@sijakret

Description

Hi,

vscode has a setting html.customData (and css.customData) which allows extending the set of html tags known to the internal language service.
Currently users need to configure the list of custom-element.json files manually in the settings.
Are there plans to implement an automatic discovery of these files from the installed npm packages?

If not, maybe this could (and should) be done via an extension.
There is a corresponding contribution point. However, it seems to be pointing to a static file only. Also, it looks like changes to that file are not monitored so a hacky approach like overwriting some sort of temp schema file does not seem viable as well.
Is there any away for an extension to signal updates to the custom data it is contributing?

If so, a generic extension could provide logic + settings to discover these definitions and expose them to vscode once discovered. I would be happy to implement this. It would streamline consuming web component libraries quite a bit compared to having to manage paths manually in the vscode settings.

This looks like the most relevant thread on the web component side: WICG/webcomponents#776

Side note: Some libraries already ship cusomt-elements.json files. They indicate their presence with a "customElements" field in the package.json. It's just that no one seems to pick them up..
image

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorfeature-requestRequest for new features or functionalityhtmlHTML support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions