JetBrains / web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
Apache License 2.0
279 stars 25 forks source link

How should these be used in practice as an end-user? #12

Closed hackel closed 4 years ago

hackel commented 4 years ago

I can't seem to get IDEA Ultimate (2019.2.3) to recognize web-types. As a testcase: I created a new Vue.js project and installed bootstrap-vue and @web-types/bootstrap-vue. When editing a Vue template, both b-form and BForm still show "Unknown html tag" as always. Oddly, it will auto-complete Form with no prefix as coming from bootstrap-vue, along with its props. After doing so, jumping to the declaration goes to node_modules/bootstrap-vue/esm/mixins/form.js.

Do I need to somehow register bootstrap-vue (or its types) as a library in my project?

piotrtomiak commented 4 years ago

@hackel As an end user you do not have to do anything to use web-types from supported libraries, nor should you install @web-types/* packages, which are published to NPM for convenience, but are automatically downloaded by IDE. IDEA doesn't have Vue.js plugin bundled, which version of the plugin do you have installed in your IDEA?

hackel commented 4 years ago

Ahh okay, I misunderstood the announcement and this repo then. My Vue.js plugin is 192.6262.27.

piotrtomiak commented 4 years ago

@hackel No problem. Anyway, the code completion in 2019.2. should work for you if you use single file component files (.vue), but if you use inline templates, or you store them in separate HTML files, than you need to try out 2019.3 EAP.

hackel commented 4 years ago

Thank you. I finally figured out that the download request was being blocked by my proxy. After allowing raw.githubusercontent.com and registry.npmjs.org, it is working fine.

piotrtomiak commented 4 years ago

@hackel Awesome! Thanks for sharing the solution.