Skip to content
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

[html] Add support for custom tag providers for HTML #2784

Closed
kamiua opened this issue Feb 8, 2016 · 7 comments
Closed

[html] Add support for custom tag providers for HTML #2784

kamiua opened this issue Feb 8, 2016 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality html HTML support issues on-testplan

Comments

@kamiua
Copy link

kamiua commented Feb 8, 2016

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.

@aeschli aeschli added html HTML support issues feature-request Request for new features or functionality labels Feb 9, 2016
@aeschli aeschli modified the milestones: Feb 2016, Backlog Feb 9, 2016
@aeschli aeschli changed the title Add support for custom tag providers for HTML [html] Add support for custom tag providers for HTML Feb 9, 2016
@lafe
Copy link

lafe commented Mar 2, 2016

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.

@Tyriar
Copy link
Member

Tyriar commented Mar 3, 2016

@lafe great idea!

@watzon
Copy link

watzon commented Apr 5, 2016

Yes please!

@purdrew
Copy link

purdrew commented Jun 7, 2016

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.

@aeschli
Copy link
Contributor

aeschli commented Jun 8, 2016

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.
The plan is to extract that code from our HTML support to a node_module so it can be used by extensions

@purdrew
Copy link

purdrew commented Jun 8, 2016

@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.

@aeschli
Copy link
Contributor

aeschli commented Jun 10, 2016

You would write an extension like this one:
https://github.com/Microsoft/vscode/blob/master/extensions/configuration-editing/src/extension.ts
That one adds completion proposals to the keyboard.json file.
That code uses a library called 'jsonc-parser' to find out where the cursor is and what to complete. That's where the work will be.
Check out our documentation on how to scaffold an extension and how to publish it when done.
https://code.visualstudio.com/docs/extensions/example-hello-world

@michelkaporin michelkaporin mentioned this issue Jun 1, 2017
29 tasks
@octref octref modified the milestones: Backlog, December/January 2019 Jan 15, 2019
octref added a commit to microsoft/vscode-html-languageservice that referenced this issue Jan 15, 2019
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)
octref added a commit to microsoft/vscode-html-languageservice that referenced this issue Jan 15, 2019
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)
@aeschli aeschli assigned octref and unassigned aeschli Jan 29, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality html HTML support issues on-testplan
Projects
None yet
Development

No branches or pull requests

7 participants