dylanirlbeck / tailwind-ppx

A Reason/OCaml Pre-Processor eXtension (PPX) that validates your Tailwind classes at compile-time.
MIT License
152 stars 15 forks source link

VSCode autocompletion #88

Closed celsobonutti closed 3 years ago

celsobonutti commented 4 years ago

I know there's support for tailwind-coc in Neovim, but is vscode-tailwindcss support planned?

I don't have much experience with VSCode extension development, but I'm more than willing to help in whatever I can.

dylanirlbeck commented 4 years ago

@celsobonutti Good call! I just opened an issue for this in vscode-tailwindcss, so hopefully we can get a response there: https://github.com/bradlc/vscode-tailwindcss/issues/120

If you want an example of how I implemented auto-completion support in coc-tailwindcss, see this PR. Perhaps it could provide some inspiration to open a PR in vscode-tailwindcss?

celsobonutti commented 4 years ago

@dylanirlbeck thanks man, I was in doubt if this should be done here or in vscode-tailwind.

Thank you very much for showing me your coc-tailwindcss PR, I'll try to create one for VSCode ASAP.

dylanirlbeck commented 4 years ago

@celsobonutti Take a look at this comment in vscode-tailwindcss by (seemingly) one of the maintainers: https://github.com/bradlc/vscode-tailwindcss/issues/120#issuecomment-631389316.

If you'll be too busy I'd be happy to try and open a PR, though it'd be awesome if you could! VSCode support is definitely a must-have.

celsobonutti commented 4 years ago

Hey @dylanirlbeck! I had a hard time this week at my work and couldn't work on that PR.

I'll do it tomorrow or Sunday for sure, 100% agree that VSCode support is a must-have.

dylanirlbeck commented 4 years ago

No worries! There's no rush --- let me know if you have any questions or need a code review 😄

celsobonutti commented 4 years ago

Hey @dylanirlbeck, I've created a PR: bradlc/vscode-tailwindcss#122

But I'm not able to test the extension at all. I also tried to do some other changes and see if they have any effect, but had no luck. Can you help me with that?

Thank you very much!

dylanirlbeck commented 3 years ago

@celsobonutti Did you see Brad's comment about the new experimental regex feature? Would be awesome if you could try it out with tailwind-ppx! If it works, feel free to open a PR to add a section to the README 😄

celsobonutti commented 3 years ago

Hey @dylanirlbeck! I'll do it as soon as I can, thanks for the heads up! 😄

dauletisataev commented 3 years ago

Hey! @celsobonutti @dylanirlbeck so, you decided to stick with tailwindCSS.experimental.classRegex ? if yes, it would be very helpful for others to post kinda guideline here :)

dauletisataev commented 3 years ago

I have added quick configuration in settings.json: "tailwindCSS.experimental.classRegex": [ "%tw \"([^\"]*)" ] But, it does not cover the cases like this, when string started in new line:

%tw
"top-full left-0"