lit-analyzer
lit-analyzer copied to clipboard
vscode-lit-plugin ignores `css.customData`
According to the vscode-css-languageservice documentation, it supports configuration via the css.customData setting.
However, the vscode-lit-plugin does not appear to honor these settings when analyzing css templates. For example, it should be possible to define a custom @ rule, like so:
.vscode/settings.json:
{
"css.customData": ["./.vscode/css-data.json"]
}
.vscode/css-data.json (attempting to work around #323):
{
"version": 1.1,
"atDirectives": [
{
"name": "@container",
"description": "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries"
}
]
}
Example TypeScript code:
import { css } from "lit";
export const EXAMPLE_CSS = css `
@container (width < 600px) {
/* ... */
}
`;
Expected: No warnings.
Actual: Problems view reads Unknown at rule @container lit-plugin(no-invalid-css).