-
Notifications
You must be signed in to change notification settings - Fork 219
not working on .svelte files #151
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
Comments
I'm having the same issue, despite having configured the extension to treat svelte files as html: "tailwindCSS.includeLanguages": {
"svelte": "html",
} |
I also had this problem. @feugy I actually found that setting |
Update: it was still being super flaky, sometimes working and sometimes not. I think TabNine was interfering with the autosuggest so I've just uninstalled that, and it seems to have helped. |
Hi, I'm also having this issue, can't get Tailwindcss-intellisense to work with my EDIT : managed to get it working by using a capitalized "Svelte" for the |
Well, starting today, even with my capitalized Svelte tweak, nothing works again 😓 |
Hi @Miaourt. I was having the same problem. On any kind of file (.html or .vue) it didn't do any autocomplete unless I typed something first (like your example On my setup I realized this is was due to I honestly don't really know what this |
Hi @raicem, nice catch ! Seems to do the trick for me too, for now ! |
@raicem Pretty cool, I was having the same issue and it also seems to have worked for me. Thanks! 😀 |
Are you still having issues @FocalChord? |
I just ran into this issue; there's definitely something still going on here, and it would be great to figure out the happy setup path and at least mention it in the setup docs, so every Svelte + Tailwind + VSCode user doesn't have to find this issue, run through it, and hack at their settings.😅 I can at least say that this should be in the plugin defaults:
Also worth mentioning that VSCode has a "Trigger Suggest" command (Apparently Command-I by default? Or Command-shift-P, search for "trigger suggest"); it seems that some suggestions pop up automatically in certain cases, and sometimes it works better with explicit activation. I don't know why it works that way.🤷 Possible next debugging step: Does the Tailwind plugin work automatically in |
This setting will probably help with that 👍
Going to close this as it was created a long time ago and I don't believe there is an actual issue here. I just want to clarify a couple of things:
Please open a new issue if you are still having issues 🙏 |
I tried all suggestions in here and but can't get tailwindcss-intellisense to work for .svelte files. To demo, I also created a template.svelte file to show that it works with .html but not with .svelte. Maybe there's a conflict with another extension? These are the Svelte extensions I'm using. I tried disabling all but Svelte for VSCode (and reloading) but still no luck. This is my first time trying Tailwind CSS and I can see that Intellisense will be very important. :) |
tailwindcss-intellisense now works for me, but unfortunately I don't know what changed that make it work. |
@bradlc's comment worked for me but I had to reload vscode. |
I recommend switching to WindiCSS which uses tailwind and works perfectly with svelte. |
In my case it was a problem with config name. |
I was initially having this issue, which brought me to this thread. The suggestion from @bradlc in this post above got it working for me. In particular, I added the following to my settings.json in VS Code.
|
According to my tests, with multiple folders open in one workspace, the tailwindcss plugin will fail |
open your vscode settings and paste this basically it does is it allows vs code to give suggestion even if it is string |
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
} This seems to work with single and multiple folders in a workspace. |
Can anybody tell me, how to enable intellisense for the theme function inside the // ...
addComponent({
background: theme('...')
}) but I don't get suggestions. The solutions above don't solve it. |
same issue as literally everyone else. Installing WindiCSS did the trick for me |
"tailwindCSS.experimental.configFile": "tailwind.config.ts" Manually specifying the config file resolved the issue for me. p.s. before adding the above config, I encountered the error below. I have no idea why it searched for the Nuxt config while I was using Svelte. lol [Error - 12:17:00 AM] Tailwind CSS: ENOENT: no such file or directory, stat '/<path_to_project>/.nuxt/tailwind.config.cjs' |
Had this issue with the tailwindcss v3.4.11. Switching to the pre-release version of the extension seems to fix it. Along with specifying the config file in experimental options as mentioned by @richeyphu . |
This worked for me |
Nothing is being auto completed as shown below
The text was updated successfully, but these errors were encountered: