-
Notifications
You must be signed in to change notification settings - Fork 215
Not working for HTML-like files #58
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
Poking in the code, could it be as simple as adding Perhaps it's better to make this list extensible through a setting? |
Doesn't work for me for .jsx files. Would be great if that could work too. Thanks. |
same here for svelte files |
I'm pretty sure @SHxKM's suggestion should work for django, and a similar simple change should work for most other html-like files. As you can see from #18 , that's all it took to make this work for Phoenix last year. I think that what we need is a setting for the extension that can be modified by users to add other filetypes so that it's not hard-coded in the extension, requiring a pull request for every addition. This would be similar to how PHP Intelephense does it: In your "intelephense.files.associations": [
"*.php",
"*.phtml",
"*.myRandomFiletype"
] and then it will start treating I've looked into the code for this extension and I can't wrap my head around how to implement something like this yet. What do you think, @bradlc? |
Ditto when I've told VS Code to treat foo.css as PostCSS. I get completions for foo.css as CSS. Extension version 0.2.0 VS Code version 1.36.1 |
It's not working on js and jsx files |
I have the same problem, but in ie.
Anyway, since author is not responding and this is very easy fix + pretty much a blocker, probably forking is the way to go. |
It does not works for any Vue + Tailwind project. |
BTW. @skycult make sure you have config file in your project. When i was tuning forked extension for my use case i discovered https://github.com/bradlc/vscode-tailwindcss/blob/master/package.json#L25-L27 which means extension wont even activate until you have a tailwind config. |
I've added the tailwind config but it still doesnt show up on vue-file, any suggestion? |
I have problem with If changing the VSCode file type (lower right hand corner of window) to HTML manually when editing tailwind classes which is annoying but does work. So I can see this extension support HTML (EEx): https://github.com/bradlc/vscode-tailwindcss/blob/f5dfe02f74ac9bd68529f1997ae875691b819833/src/index.ts#L50 Check topic on the ElixirForum, please: https://elixirforum.com/t/how-to-force-the-tailwind-css-intellisense-extension-for-vscode-work-with-html-eex-and-html-leex-files/25520 |
|
It would be awesome of we could add our list of filetypes because I think it would be bad for the maintainer of the plugin to have to add them all. The real logic seems to be in |
Need to use the extension for .cfm files too. |
I'd love to have it work for |
For what it's worth, I switched to Intellisense for CSS by Zignd and it works for my use case which is setting the VS Code language mode to Django HTML. |
I would love to see this work on .NET files ( |
Would love this for .twig files as well. |
And I'd love to see support for glimmer templates (hbs) in Ember.js projects |
I personally like how emmet does it.
though from reading the code not sure why #54 is not working. |
👍 for mustache files |
doesnt work in vue files in vs code. does work in intellij idea though. |
I can confirm that while trying the new v Testing on standard |
@zolrath That's odd. It works fine for me in I am definitely going to look into adding a file association setting 👍 For now I have added some languages to |
@bradlc |
@bradlc |
I also get the same ^ |
I've been performing some tests for Elixir support now that the name is correct in In a standard Phoenix project the directory structure (only showing relevant files/folders) is:
The behavior I'm seeing is that if I start VSCode in the root directory I get no Tailwind IntelliSense of any kind. Start VSCode in root
Start VSCode in /assets
It seems that the extension isn't recognizing the tailwind.config.js files location? Edit: Since Edit 2: |
Would love to see support for nunjucks templates (.njk) |
Use this instead: https://marketplace.visualstudio.com/items?itemName=Atishay-Jain.All-Autocomplete Just open the generated css file (e.g. public/css/app.css) in a tab and the classes will complete in all other tabs. |
For anyone stumbling upon this, the new way for making emmet work with your "emmet.includeLanguages": {
"html-eex": "html"
}, |
BTW this extension is not working with HTML EEx files anymore :( |
@bradlc |
any updates? |
|
So this issue "not working for HTML like files" has been closed with addition of django-html support? Should I open another issue for adding the support for other html like file extensions that still won't work, or should we just forget about it for now?
|
@andreasRu |
@bradlc Oh goodness!!! Just updated/added to my workplace, works PERFECTLY!!! LOVE YOU 💯 :D THANK YOU SO MUCH!!! |
Thanks a ton, @bradlc! |
could you pls extend for .hbs handlebars files |
@bradlc could you pls extend for .hbs handlebars files |
for hbs: {
"tailwindCSS.includeLanguages": {
"hbs": "html",
},
}
|
|
For Django templates: "tailwindCSS.includeLanguages": {
"plaintext": "django-html",
"django-html": "html",
} Works flawlessly! |
Thanks for that! The same works for nunjucks; can we make this part of the documentation?
|
@xshapira thnx, Worked in the custom workspace: "json.schemaDownload.enable": true,
"files.associations": {
"*.html": "jinja-html"
},
"emmet.includeLanguages": {
"jinja-html": "html"
},
"[jinja-html]": {
"editor.defaultFormatter": "monosans.djlint",
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.formatOnSave": true
},
"tailwindCSS.includeLanguages": {
"plaintext": "jinja-html",
"jinja-html": "html",
"javascript": "javascript",
"css": "css"
} |
Doesn't work for me. I have both Tailwind CSS Intellisense and junstyle's Django Template Support and I use django-tailwind package in Django project. |
How do I set it for .jsx files? |
Thanks for the great extension.
For regular HTML files, it works great. However, the extension stops working completely once a file is associated via VSCode to another file type.
For example, Django template files use the regular
.html
extension but include special mustache{{ }}
syntax. I'm using another extension to get tag highlighting for these files, as well as emmet expansion. But once I associate this file as "Django HTML" - TailwindCSS Intellisense stops working.Anything I'm missing?
The text was updated successfully, but these errors were encountered: