-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
HTML Files recognized as Django template in VS Code #33
Comments
I am having problems with this, too. Configuring the "file.associations" settings seems like the right approach, but even when I add the suggested snippet to my settings, all HTML files get recognized as "django-html." "files.associations": {
"**/templates/*.html": "django-html",
"**/templates/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
}, Shouldn't this snippet cause only html files in a |
Update: These settings seem to work for my needs. "files.associations": {
"*.html": "html",
"**/templates/**/*.html": "django-html"
}, Would this be a better configuration to include in the README? |
This Totally worked for me. -> in case you're lost
|
Thank you so much this worked for me |
Thanks.... I was getting messed up in my server due to this |
Excellent! This has bugged me for months |
Thanks works for me too! |
I want this problem in my VSCODE. How to get this problem, please? |
So, after vscode is recognizing django templates as django templates, how do I get all the html and emmet feature back? I mean features like html intellisense, code completion and formatting etc... for formatting I tried in settings.json: "[django-html]": {
"editor.defaultFormatter": "vscode.html-language-features"
} but it does not work. I don't want to install additional extensions like beautify or prettier because they don't support django templates and are making formatting even worse. But it would be enough for me to get IntelliSense and code completion back. Any ideas? Thanks! |
Thank you for your very valuable advice, it helped me a lot. |
Solved in this thread. In summary:
|
Thank you very much |
I found that you have to add the following line to VSCode's settings.json: This fixed it for me, hope it helps. |
In case you were too lazy to type it out lmao. |
This is the perfect solution. Hands down. |
just uninstall Django in extension problem solved |
Thanks for your patience. I found the undocumented 🗑️ You can remove the file associations in your settings, for both I hope it will reduce the frustration of you guys and new comers. |
This worked for me... Thanks a lot. |
@michael-hll Have you updated the extension and tried to remove the html file associations? |
this worked for me, but wrote "/templates//*.html": "html" instead don't know why to use "django-html", but didn't get intellisense with it |
Hey! This worked for me but I am still not able to use doctype file using shift + 1. |
If Django extension is installed in VS Code, all HTML files are recognized as Django files and displays a wrong icon.
The text was updated successfully, but these errors were encountered: