Skip to content

Instantly share code, notes, and snippets.

@cjkihl
Created December 9, 2024 04:33
Show Gist options
  • Save cjkihl/c20085c2836eb56cb783f50fbc940f57 to your computer and use it in GitHub Desktop.
Save cjkihl/c20085c2836eb56cb783f50fbc940f57 to your computer and use it in GitHub Desktop.
TailwindCSS Config for Autocomplete
{
// Config for VsCode Tailwind CSS IntelliSense extension for React
// Type hints for className and class attributes
"tailwindCSS.classAttributes": [
"class",
"className",
],
// Type hints for variables and properties ending with *className
"tailwindCSS.experimental.classRegex": [
["\\b\\w+[cC]lassName\\s*=\\s*[\"']([^\"']*)[\"']"],
["\\b\\w+[cC]lassName\\s*=\\s*`([^`]*)`"],
["[\\w]+[cC]lassName[\"']?\\s*:\\s*[\"']([^\"']*)[\"']"],
["[\\w]+[cC]lassName[\"']?\\s*:\\s*`([^`]*)`"]
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment