Closed predrag-codetribe closed 1 year ago
One way to do it is to use tailwindCSS.experimental.classRegex
in LSP-tailwindcss.sublime-settings:
{
"settings": {
"tailwindCSS.experimental.classRegex": ["\\/\\*\\s?tw\\s?\\*\\/\\s?'(.*)'"]
}
}
That will allow to have autocomplte in strings that start with /tw/:
let regularString = /*tw*/'' // <- now you have autocomplete
For you use a function like classnames
, use the following regex:
"tailwindCSS.experimental.classRegex": [
["classnames\\(([^)]*)\\)", "'([^']*)'"]
]
that will enable autocomplite in strings like:
const cn = classnames('', className)
How to get autocomplete in regular strings?