Support twind
igorbrasileiro opened this issue · 6 comments
Hi, thank you for this amazing coc extension.
Do you have plans to allow this extension be compatible with the https://twind.dev/ ?!
Another ref: https://github.com/tw-in-js/vscode-twind-intellisense
I have never used twind and will find time to check it out.
I have never used twind and will find time to check it out.
Thank you for the answer.
I'm trying to port, but I don't have enough context and I'm getting an error. Take a look at my changes: https://github.com/igorbrasileiro/coc-tailwindcss3/commit/6db5fa30e5325dbe2db34df86100005b32904b67
Try this setting to coc-settings.json
. Does it behave the way you expect it to behave?
coc-setting.json:
{
"tailwindCSS.experimental.classRegex": [
"tw`([^`]*)", // tw`...`
"tw=\"([^\"]*)", // <div tw="..." />
"tw={\"([^\"}]*)", // <div tw={"..."} />
"tw\\.\\w+`([^`]*)", // tw.xxx`...`
"tw\\(.*?\\)`([^`]*)" // tw(Component)`...`
]
}
Try this setting to
coc-settings.json
. Does it behave the way you expect it to behave?coc-setting.json:
{ "tailwindCSS.experimental.classRegex": [ "tw`([^`]*)", // tw`...` "tw=\"([^\"]*)", // <div tw="..." /> "tw={\"([^\"}]*)", // <div tw={"..."} /> "tw\\.\\w+`([^`]*)", // tw.xxx`...` "tw\\(.*?\\)`([^`]*)" // tw(Component)`...` ] }
Hi, i made it work with the tailwind.config.js file into my project folder without this setting, but it doesn't work properlly, since twind has different classes of tailwindcss. For example, twind doesn't have peer
for siblings, have siblings
.
About the port, do you know if the coc nvim is capable of run JS file as language server client, because the twind/typescript-plugin doesn't have a executable like tailwind?
I checked the code for vscode-twind-intellisense
. This appears to be an extension that needs to work with tsserver
.
You may find coc-styled-components
by fannheyward
helpful.
Ohh, nice, thank you for the help!!