Skip to content

Instantly share code, notes, and snippets.

@efosao
Forked from Chris-Gillis/component.go
Last active February 23, 2024 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efosao/bca2f16d32750495529415d92b840fe6 to your computer and use it in GitHub Desktop.
Save efosao/bca2f16d32750495529415d92b840fe6 to your computer and use it in GitHub Desktop.
Visual Studio Code config to get TailwindCSS autocomplete in Gomponents classes
import (
. "github.com/maragudk/gomponents/html"
)
func HeaderView() g.Node {
component := Div(Class("/* inside here you get tailwind autocomplete */"))
return component
}
{
"tailwindCSS.includeLanguages": {
"go": "html",
},
"tailwindCSS.experimental.classRegex": [
"Class\\(\"([\\w\\s\\-\\:\\[\\]/]*)\"\\)",
"Classes\\{\"([\\w\\s\\-\\:\\[\\]/]*)\":(.)*\\}"
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment