Last active
February 23, 2024 02:49
-
-
Save Chris-Gillis/f04416d8179114f666b002c146c6f379 to your computer and use it in GitHub Desktop.
Visual Studio Code config to get TailwindCSS autocomplete in Gomponents classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
. "github.com/maragudk/gomponents/html" | |
) | |
func HeaderView() g.Node { | |
component := Div(Class("/* inside here you get tailwind autocomplete */")) | |
return component | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tailwindCSS.includeLanguages": { | |
"go": "html", | |
}, | |
"tailwindCSS.experimental.classRegex": [ | |
"Class\\(\"([\\w\\s\\-\\/]*)\"\\)" | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for posting this!!
I've updated it a bit to allow for:
hover:bg-white
.w-[100px]
.c.Classes{"bg-red-200": isError},