-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intellisense in tv config hangs on project when running process on large tv file #127
Comments
I'm experimenting with a new regex that is more performant and will update the docs after some more testing and usage. "tailwindCSS.experimental.classRegex": [
["tv\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)", "\"(.*?)\""]
] |
The issue is just the regex. There is no [
"tv\\((?<=\\()(?:[^()]*|\\([^)]*\\))+(?=\\))\\)",
"[\"'`]([^\"'`]*).*?[\"'`]"
] I didn't change the second regex that extracts the actual class names, because it doesn't ensure opening and closing string matching, but in normal case where you don't have syntax error in your code it will work, so good enough. Here example regex101: |
This comment was marked as off-topic.
This comment was marked as off-topic.
@bitabs If there were updates, they would be posted. Please don't post "are there any updates" type of comments. They are not helpful to maintainers. |
Describe the bug
When using a tailwind-variants
tv
config with a moderate amount of compound variations, the tailwind-intellisense extension hangs indefinitely for the whole project.To Reproduce
The best way i can think of to simulate the issue is the following
4a. Now add the following two compoundVariants to the above config. When i try to get intellisense working on any classNames momentarily, the loading tooltip appears and hangs indefinately. furthermore the entire intellisense process seems to hang indefinately on the whole project.
Expected behavior
Intellisense should continue to work without hanging - i thought at first this was an intellisense issue however having narrowed it down to the tv config i strongly suspect the way that typescript types are generated internally within tailwind-variants is possibly producing a huge amount of variations causing the workspace wide freeze.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: