-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Description
When a function specified in settings.classFunctions is called with generic type parameters, IntelliSense features (autocomplete, hover, etc.) do not work for the class names inside that function call.
Example
// This works
myClassFunction('flex items-center')
// This does NOT work
myClassFunction<{ key: 'value' }>('flex items-center')Settings
{
"tailwindCSS.classFunctions": ["myClassFunction"]
}Root Cause
The regex in matchClassFunctions (find.ts:182) expects the function name to be immediately followed by ( or `:
let FN_NAMES = /(?<=^|[:=,;\s{()\[])([\p{ID_Start}$_][\p{ID_Continue}$_.]*)[(`]/dgiuHowever, when generics are used, the function name is followed by <...> before (, so the regex does not match.
Expected Behavior
classFunctions should work regardless of whether the function is called with generic type parameters.
Environment
What version of VS Code are you using?
1.108.0
What version of Tailwind CSS IntelliSense are you using?
0.14.29
What version of Tailwind CSS are you using?
4.1.18
What package manager are you using?
For example: pnpm
What operating system are you using?
macOS