Repository navigation
Tailwind intellisense/auto-complete support #124
Replies: 17 comments 12 replies
|
I don't know honestly, but it shouldn't be too hard to come up with some regexes that work, for instance (not tested) etc... if you get it working, can you report back what you used? |
|
I'm solving this by creating my own design system ( Then you can add For example: |
I've been using it for a few weeks and it's been working perfectly. |
|
Great, my use case is getting it to work with emacs which isn't working with the same regex expression. When i figure it out il post it here. |
|
@nicwhitts I got it working after installing tailwindcss and postcss 8 dependencies. |
Great, the other alternatives don't work for me and that was going to be 10/10 to dispense with the workarounds. |
|
I was looking to do the same. I found this solution. I use Neovim and it works great. For VScode: For Neovim LSP: Source: https://githubmemory.com/repo/kabouzeid/nvim-lspinstall/issues/45 |
|
This is what I am using for both VS Code and Neovim LSP with a colorizer plugin but the regex for |
For those who want a quick copy and paste1. Tailwind CSS > Experimental: Class Regex"tailwindCSS.experimental.classRegex": [
"tw`([^`]*)",
["tw.style\\(([^)]*)\\)", "'([^']*)'"]
]2. VSCode typescriptreact snippets"Tailwind React Native Class": {
"prefix": "rnClass",
"body": [
"style={tw`$1`}"
],
"description": "Tailwind React Native Class"
},
"Tailwind React Native ClassNames": {
"prefix": "rnClassNames",
"body": [
"style={tw.style('$1')}"
],
"description": "Tailwind React Native ClassNames"
}3. Working
<!-- rnClass -->
<View style={tw``}></View>
<!-- rnClassNames -->
<View style={tw.style('')}></View> |
Steps to config twrnc with official Tailwind plugin:🗃️ Create tailwind.config.{js,cjs,mjs,ts} file on the root path.
|
|
Has anyone found a way to enable the autocompletion for JetBrains IDEs? |
|
Another tip! Run I had an invalid import that was crashing the plugin but there were no errors until I looked at those logs. |
|
webstorm configuration, I hope to help you
"experimental": {
"configFile": null,
"classRegex": [
"tw\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"
]
} |
|
So the way i got mine to work was to add this line to my settings.json:
So the full code I added to my I hope it helps... |









Uh oh!
There was an error while loading. Please reload this page.
I'm trying to figure out the correct regex to use for intellisense support. Similar to
tailwind-rnvadimdemedes/tailwind-rn@2f848b6
What is the full regex pattern for tailwind-react-native-classnames to use with
tailwindCSS.experimental.classRegexconfig?All reactions