runem / lit-analyzer

Monorepository for tools that analyze lit-html templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

warrenbuckley opened this issue · comments

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

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'

| `customHtmlData` | This plugin supports the [custom vscode html data format](https://code.visualstudio.com/updates/v1_31#_html-and-css-custom-data-support) through this setting. | [Vscode Custom HTML Data Format](https://github.com/Microsoft/vscode-html-languageservice/blob/master/docs/customData.md). Supports arrays, objects and relative file paths | |

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

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?