Skip to content

Commit b95ca85

Browse files
committed
Clarify that tailwindCSS.classFunctions are regex patterns
1 parent fdad2e9 commit b95ca85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/vscode-tailwindcss/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ The HTML attributes for which to provide class completions, hover previews, lint
9494

9595
Functions in which to provide completions, hover previews, linting etc. Currently, this works for both function calls and tagged template literals in JavaScript / TypeScript.
9696

97+
Each entry is treated as regex pattern that matches on a function name. You *cannot* match on content before or after the function name — matches are anchored to function names only.
98+
9799
Example:
98100

99101
```json
100102
{
101-
"tailwindCSS.classFunctions": ["tw", "clsx"]
103+
"tailwindCSS.classFunctions": ["tw", "clsx", "tw\\.[a-z-]+"]
102104
}
103105
```
104106

@@ -108,6 +110,7 @@ let classes2 = clsx([
108110
"flex bg-red-500",
109111
{ "text-red-500": true }
110112
])
113+
let element = tw.div`flex bg-red-500`
111114
```
112115

113116
### `tailwindCSS.colorDecorators`

0 commit comments

Comments
 (0)