Tailwind intellisense/auto-complete support #124
Replies: 16 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? |
Beta Was this translation helpful? Give feedback.
-
I'm solving this by creating my own design system ( Then you can add For example:
|
Beta Was this translation helpful? Give feedback.
-
I've been using it for a few weeks and it's been working perfectly. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@nicwhitts I got it working after installing tailwindcss and postcss 8 dependencies. |
Beta Was this translation helpful? Give feedback.
-
Great, the other alternatives don't work for me and that was going to be 10/10 to dispense with the workarounds. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
You could also add |
Beta Was this translation helpful? Give feedback.
-
This is what I am using for both VS Code and Neovim LSP with a colorizer plugin but the regex for
|
Beta Was this translation helpful? Give feedback.
-
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> |
Beta Was this translation helpful? Give feedback.
-
I added that to my settings.json, and have the extension installed, and restarted vs code. It doesn't work. Seems like maybe other extensions are interfering maybe, hard to tell. I don't have many extensions anyway. |
Beta Was this translation helpful? Give feedback.
-
Steps to config twrnc with official Tailwind plugin:🗃️ Create tailwind.config.{js,cjs,mjs,ts} file on the root path.
|
Beta Was this translation helpful? Give feedback.
-
Has anyone found a way to enable the autocompletion for JetBrains IDEs? |
Beta Was this translation helpful? Give feedback.
-
Another tip! Run I had an invalid import that was crashing the plugin but there were no errors until I looked at those logs. |
Beta Was this translation helpful? Give feedback.
-
webstorm configuration, I hope to help you
"experimental": {
"configFile": null,
"classRegex": [
"tw\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"
]
} |
Beta Was this translation helpful? Give feedback.
-
I have all the correct config listed above, and yet (in react native): |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out the correct regex to use for intellisense support. Similar to
tailwind-rn
vadimdemedes/tailwind-rn@2f848b6
What is the full regex pattern for tailwind-react-native-classnames to use with
tailwindCSS.experimental.classRegex
config?Beta Was this translation helpful? Give feedback.
All reactions