Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Last active June 2, 2022 16:10
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 james2doyle/529ccb75daea196f8a075eb30256d71f to your computer and use it in GitHub Desktop.
Save james2doyle/529ccb75daea196f8a075eb30256d71f to your computer and use it in GitHub Desktop.
Settings for Sublime LSP Tailwind extension so that it works with twin.macro JSX/TSX props
// Settings in here override those in "LSP-tailwindcss/LSP-tailwindcss.sublime-settings"
{
"settings": {
"tailwindCSS.experimental.classRegex": [
["classnames\\(([^)]*)\\)", "'([^']*)'"],
"class=\"([^\"]*)", // <div class="..." />
"tw`([^`]*)", // tw`...`
"tw=\"([^\"]*)", // <div tw="..." />
"tw={\"([^\"}]*)", // <div tw={"..."} />
"tw\\.\\w+`([^`]*)", // tw.xxx`...`
"tw\\(.*?\\)`([^`]*)" // tw(Component)`...`
],
},
// ST4
"selector": "source.jsx | source.js.react | source.js | source.tsx | source.ts | source.css | source.css.tailwind | source.postcss | source.scss | source.less | text.html.vue | text.html.svelte | text.html.basic | text.html.twig | text.blade | embedding.php"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment