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

Make HTML Language Service data driven #44

Closed
2 tasks done
octref opened this issue Jan 14, 2019 · 3 comments
Closed
2 tasks done

Make HTML Language Service data driven #44

octref opened this issue Jan 14, 2019 · 3 comments
Assignees
Milestone

Comments

@octref
Copy link
Contributor

octref commented Jan 14, 2019

@octref octref self-assigned this Jan 14, 2019
octref added a commit 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 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
Copy link
Contributor Author

octref commented Jan 28, 2019

Additional data: https://developer.mozilla.org/en-US/docs/Web/HTML

@octref
Copy link
Contributor Author

octref commented Feb 5, 2019

We get descriptions for all HTML attributes and 100 more html attributes:

image

[
  "html:version",
  "html:xmlns",
  "head:profile",
  "link:as",
  "link:importance",
  "link:importance",
  "link:integrity",
  "link:referrerpolicy",
  "link:title",
  "meta:scheme",
  "style:title",
  "body:alink",
  "body:background",
  "body:bgcolor",
  "body:bottommargin",
  "body:leftmargin",
  "body:link",
  "body:onblur",
  "body:onerror",
  "body:onfocus",
  "body:onload",
  "body:onredo",
  "body:onresize",
  "body:onundo",
  "body:rightmargin",
  "body:text",
  "body:topmargin",
  "body:vlink",
  "hr:align",
  "hr:color",
  "hr:noshade",
  "hr:size",
  "hr:width",
  "pre:cols",
  "pre:width",
  "pre:wrap",
  "ol:compact",
  "ul:compact",
  "li:type",
  "dd:nowrap",
  "main:undefined",
  "a:referrerpolicy",
  "bdo:dir",
  "br:clear",
  "ins:cite",
  "ins:datetime",
  "img:decoding",
  "img:decoding",
  "img:importance",
  "img:importance",
  "img:intrinsicsize",
  "img:referrerpolicy",
  "img:sizes",
  "iframe:allow",
  "iframe:allowpaymentrequest",
  "iframe:allowpaymentrequest",
  "iframe:csp",
  "iframe:importance",
  "iframe:referrerpolicy",
  "object:archive",
  "object:border",
  "object:classid",
  "object:codebase",
  "object:codetype",
  "object:declare",
  "object:standby",
  "object:tabindex",
  "param:type",
  "param:valuetype",
  "source:sizes",
  "source:srcset",
  "source:media",
  "area:accesskey",
  "table:align",
  "caption:align",
  "colgroup:align",
  "col:align",
  "tbody:align",
  "thead:align",
  "tfoot:align",
  "tr:align",
  "td:abbr",
  "td:align",
  "td:axis",
  "td:bgcolor",
  "th:align",
  "th:axis",
  "th:bgcolor",
  "form:accept",
  "form:autocapitalize",
  "button:autocomplete",
  "textarea:autocapitalize",
  "textarea:spellcheck",
  "meter:form",
  "dialog:open",
  "script:integrity",
  "script:nomodule",
  "script:referrerpolicy",
  "script:text",
  "canvas:moz-opaque"
]

@octref
Copy link
Contributor Author

octref commented Feb 5, 2019

We need microsoft/vscode#67952 for shipping this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant