-
Notifications
You must be signed in to change notification settings - Fork 31.6k
[html] Add support for custom tag providers for HTML #2784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To add to this: it would be a great addition to move the existing Angular Tag provider into a custom extension. Using this approach, Angular tag hints would only appear if a user needs them. At the moment tag hints are displayed even if we do not use Angular. |
@lafe great idea! |
Yes please! |
I would like to have this functionality for use with web components so I could build a system that updates intellisense when I bring in a new web component. |
You can already write extensions that contribute to the code complete in HTML file. Only catch is that you would need to have your own scanner to figure out what is completed at the current offset. |
@aeschli Can you point me at any documentation or example that shows how to add completion options for HTML language as you mentioned? Did some searching yesterday and didn't find anything. |
You would write an extension like this one: |
Changes: - Feature: HTML attribute completion documentation - Rename: tagProvider -> dataProvider - API: Now in sync with CSS LS API - HTMLTagSpecification converted to serializable plain data structure so does attributes and attribute values - Remove Angular1/Ionic1 support - Remove i18n for HTML tags, and manage them in a plain JSON-like file because - We don't have i18n support in LSP yet - There's no translation yet - The JSON-like file is typed and can be easily mainaintaed - We'll start pulling data from W3C HTML spec and MDN to do features such as short descriptions, browser support table adn syntax. Such plain JSON-like files are easy to auto-generate. - Unblocks #12, #30, #44 Fixes: - Fix microsoft/vscode#2784 - Part of microsoft/vscode#63955 (no CompletionItem.documentation for attr value yet)
Changes: - Feature: HTML attribute completion documentation - Rename: tagProvider -> dataProvider - API: Now in sync with CSS LS API - HTMLTagSpecification converted to serializable plain data structure so does attributes and attribute values - Remove Angular1/Ionic1 support - Remove i18n for HTML tags, and manage them in a plain JSON-like file because - We don't have i18n support in LSP yet - There's no translation yet - The JSON-like file is typed and can be easily mainaintaed - We'll start pulling data from W3C HTML spec and MDN to do features such as short descriptions, browser support table adn syntax. Such plain JSON-like files are easy to auto-generate. - Unblocks #12, #30, #44 Fixes: - Fix microsoft/vscode#2784 - Part of microsoft/vscode#63955 (no CompletionItem.documentation for attr value yet)
It would be nice to have option to create custom tag providers for HTML as part of vs code extensions. For example, it'd allowed to implement Angular 2 or Ionic support in extension. Right now extensibility is limited to snippets which is nice but not enough.
The text was updated successfully, but these errors were encountered: