HTML-CSS-Class-Completion
HTML-CSS-Class-Completion copied to clipboard
Automatic TailwindCSS Detection & Opt-out
Automatic TailwindCSS Detection & Opt-out
TailwindCSS Generates thousands of classes, sometimes it goes over 200k
. It should automatically opt-out of indexing them for performance reasons.
@TailwindCSS already has a built-in extension for it.
I love this extension but I just don't prefer it when I am working with Tailwind.
This update will help a lot cause I manually disable it for each and every workspace.
Thanks!
Have you considered the html-css-class-completion.excludeGlobPattern
user setting to skip Tailwind files?
It is described here in the README.md: https://github.com/zignd/HTML-CSS-Class-Completion#folders-and-files
I have no idea where the tailwind files are. I use NextJs
and all the files live in .next
folder.
Considering advanced built-in features like code splitting and dynamically injecting things when the components mount in run-time, It would be pretty hard to use html-css-class-completion.excludeGlobPattern
solution.
Common Issues
- I can setup the GlobalExclude Pattern in this case but that varies from project to project
- Some projects inject CSS dynamically into the DOM using JavaScript so we can't trace that.
- It eventually becomes a setup hell.
I suggest, at least if there is a way for the extension to look for tailwind.config.js
file at the top level root file tree and if there is one, just skip indexing stuff in the project would be really helpful.