-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggling TailwindCSS Extension On & Off Across Different Languages (PHP Ruby ...etc) #24
Conversation
Hi @EmranMR. Thank you very much for spending the time to submit this pull request. The newest version of the extension does a much better job preventing completion suggestions outside of HTML class attributes in PHP files. However, it will still offer completions in single and double-quoted PHP strings. The reason for this is to help when dynamically assigning Tailwind classes. I can see how it may be frustrating to have Tailwind suggestions inside every PHP string, so perhaps this can be added in a future release as an option in the extension preferences, rather than completely preventing them altogether. Thoughts? Thanks again for the input. Jason |
Hi @jasonplatts, Absolutely, sounds very reasonable! to be fair you are right, it is always better to give users options than sacrifice a feature! especially nowadays that any syntaxes that we can ever imagine can get mixed up in a single file! Do you think maybe a command palette to toggle it on and off would be handy? I could maybe try to make another pull request when I get a chance for it, if that helps. Are there any other languages that might have the same issue? just not sure if the command should be specific to PHP or all languages? |
Hi @EmranMR, Sorry for not getting back to you sooner. I think an option that can be toggled from the command palette and menu bar would work well. There are definitely other languages that would have the same issue. Ruby, for one. So, maybe the option could be called "HTML Specific Autocompletions" or something like that? It sounds like a great feature addition. If you have the time and would like to make another pull request, i'd be happy to add it to the extension. |
Hi @jasonplatts I just added a command in the command palette, so that the users can toggle the extension on and off on the fly. Sorry for the triplicate commits, git and programming are not my forte as you can see haha. I messed up the merges locally, then once I pushed I broke the extension. The final commit should be working like a charm now. 😊 usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution Emran. Looks good to me! I'll release an update.
Hi Jason, the extension still suggests tailwind autocompletion in the php context, this should hopefully fix it. I believe there was an issue raised as well with regards to this (#20)