runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
317 stars 36 forks source link

VSCode Lit Plugin: Does customHTMLData opition/config support a array of JSON files? #300

Open warrenbuckley opened 1 year ago

warrenbuckley commented 1 year ago

Hi @runem We are using web-component-analyzer to generate the JSON format for VSCode Custom HTML Data.

When setting "lit-plugin.customHtmlData" in .vscode/settings.json it expects an object which is the JSON file contents itself. I was hoping it would work in the same way as the VSCode setting html.customData which is an array of paths to JSON files of this schema.

Is this possible to do this currently?

As we would love for completions for package/plugin development authors using our WebComponents to get completions when writing new WebComponents that are composed of the building blocks that we supply inside Lit's html tagged literal.

Any pointers or advice you can give would be fab.

Thank again for a great set of tools for the Web Component development community 🥰 Warren

arieffikhrie commented 1 year ago

Was trying this settings since it was stated in the config-table.md, it is Supports arrays, objects and relative file paths but when trying on settings it only allow 'object'

https://github.com/runem/lit-analyzer/blob/9659154904fd2010de3749fc5e904e8c3dfe684b/docs/readme/config-table.md?plain=1#L13

tonjohn commented 9 months ago

I noticed the same thing @arieffikhrie . Looks like the documentation doesn't match the implementation: incorrectTypeArray incorrectTypeString

break-stuff commented 7 months ago

It looks like I have to copy/paste the config into the settings file in order to get this work. Is there another way to get this working with paths?