Comments (7)
It looks like this is on purpose from the .npmignore
- I wonder if the bug then is that lib/umd/languageFacts/data/html5.d.ts
even exists at all then
from vscode-html-languageservice.
Looks like this section is removed in the 3.0.4-betas - will give those a run
from vscode-html-languageservice.
Looking tricky, the codebase I'm looking at pulls a lot of the html data out of this package's privates, and there doesn't seem to be a 1:1 correlation with the new webCustomData. Going to see if I can just pull some of this from the Vetur source code.
import { HTML5_GLOBAL_ATTRIBUTES, HTML5_VALUE_MAP } from 'vscode-html-languageservice/lib/umd/languageFacts/data/html5';
import { HTML5_EVENTS } from 'vscode-html-languageservice/lib/umd/languageFacts/data/html5Events';
import { HTML5_TAGS } from 'vscode-html-languageservice/lib/umd/languageFacts/data/html5Tags';
from vscode-html-languageservice.
It seems like that the data is now available like this:
import { htmlData } from 'vscode-html-languageservice/lib/umd/languageFacts/data/webCustomData';
htmlData
implements the public interface HTMLDataV1
so it contains events tags, global attributes, and a map.
Is there any possibility to make these default language facts public, so we can import them like import { htmlData } from 'vscode-html-languageservice';
?
from vscode-html-languageservice.
We actually publish them to https://www.npmjs.com/package/vscode-web-custom-data, but it doesn't include the types. However it includes the data according to the JSON spec. Would adding d.ts to the vscode-web-custom-data
project work for your case?
If you are interested in raw data you should definitely import from vscode-web-custom-data
, not the internals of html LS.
from vscode-html-languageservice.
Thank you for the info! I did not know about that package. I tried importing it like import htmlData from 'vscode-web-custom-data/data/browsers.html-data.json';
and it seems to work, although infered types are off a little (string
not assignable to MarkupKind
), but that's okay for me. But of course it would be great if you could add the types. Just to be sure: After that I would import the json like import { htmlData } from 'vscode-web-custom-data
?
from vscode-html-languageservice.
I just published [email protected] has
- New API
getDefaultHTMLDataProvider
to get the default HTML data provider - New API
newHTMLDataProvider
to create a new provider from data.
from vscode-html-languageservice.
Related Issues (20)
- Use `attr="$0"` instead of `attr="$1"` as completion insert text HOT 3
- Docs link to deleted file
- VOID Elements hardcoded for with non html langauges HOT 3
- HTML folding range should include end tag
- Intellisense for ="" needs Ctrl + Space to wake up HOT 1
- Support for DocumentSymbol format HOT 1
- How to run vscode-html-languageservice
- Invalid error message: "Cannot redeclare block-scoped variable" HOT 2
- HTML document formatter doesn't indent nested `<menu>` tags HOT 2
- Are Typescript types available? HOT 1
- Translatable HTML language service
- Restrict Attribute List for Custom Elements/Web Components
- Issues when calling html language service through vscode built-in commands
- Add support for template literal escaped attributes HOT 1
- Parsing of incomplete html doesn't catch a closing tag without an opening.
- Comment end confusion inside inline Javascript intellisense
- Executing `vscode.executeFormatDocumentProvider` with HTML files can return end range exceeding file length HOT 1
- Allow writing TypeScript in Script tags with @ts-check HOT 3
- the `html.customData` configuration does not work in vue files. HOT 1
- This repo is missing important files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-html-languageservice.