windicss-intellisense
windicss-intellisense copied to clipboard
intellisense in template strings
Hi, I want to use windi with lit. I can't get the intellisense working in the template strings. e.g.:
html`<div> class='w-20'></div>`
I tried multiple different pattern in my settings, but I can't get it to work.
"typescript": {
"type": "js",
"patterns": [
"(\\s+class\\s*=\\s*{?\\s*[\"'\\`])[^\"'\\`]*$"
]
},
I would greatly appreciate a tip.
@woldtwerk that works in js
and ts
files.
If the pattern does not work for you, I think the VS Code identifier for lit the key where you have typescript, might be different
"windicss.includedLanguages": {
"javascript": {
"type": "js",
"patterns": ["\\s+class\\s*=\\s*{?\\s*[\"'`][^\"'`]*$"]
}
}
@alexanderniebuhr Oddly enough it works correctly in plain js files. Shouldn't it work out of the box in ts files if it works in js?
yeah it should work exactly the same. Just tested it with ts file.. getting same issue. Not sure what is happening here. Might interfere with some other completions of language server or so. :(
If I do it like this it works:
"windicss.includedLanguages": {
"typescript": "javascript",
}
gonna try adding a pattern so it works for classmap aswell.
Just had the same issue on a tsx file.