Comments (10)
Try adding the Emmet configuration into your settings.json file:
"emmet.includeLanguages": {"django-html": "html"},
from vscode-django.
Not that I'm aware of. It's either HTML snippets with VS Code or Django template snippets with the extension.
I wonder if the Django extension can be modified to work with the other HTML extensions to have support for both.
from vscode-django.
Just noticed this too. But if you change the file type at the bottom, don't you lose the django syntax highlighting and also the auto-complete? I seem to. Is there a way to get both working in tandem? right now this just seems to 'turn-off' the extensions for the file in question.
from vscode-django.
I noticed the same thing, you can "fix" this by changing the file type at the bottom right from "Django HTML" to regular HTML
from vscode-django.
Try adding the Emmet configuration into your settings.json file:
"emmet.includeLanguages": {"django-html": "html"},
This totally solved the issue! Thank you!
from vscode-django.
Cool. So I guess the solution then is to use emmet?
Technically that does mean that you are still bypassing the base html support in vscode, where by typing <div>
you automatically get the </div>
to end it, but if you type div
and select the emmet auto-complete you get the full <div></div>
with your cursor in the middle.
I suppose that's actually even better :) Thanks for the tip!
from vscode-django.
Is it just me that loses the whole Django formatting when changing the language to HTML?
By using Django HTML I get nice syntax highlight and Django autocompletion but I lose the nice formatting of HTML that adds a new indented line between tags when I type div
and hit enter, for example. (I already have the emmet added to settings.json)
from vscode-django.
@everspader me too. It seems that Emmet and this ext can't live together.
from vscode-django.
Also having this issue. Would really like to be able to have autocomplete for both html and django syntax together. Is there a fix for this incoming?
from vscode-django.
from vscode-django.
Related Issues (20)
- code snippet should use double quotes (Django recommendation) HOT 6
- Turns off my auto complete for html tags
- Django HOT 1
- Feature Request: Click on url view name jumps to View
- emmet not working in django v1.14.0 HOT 2
- cant install d jango HOT 1
- django HOT 1
- Setup
- Kolya_first
- add template variable details.
- b
- terramundicascavel
- Django url and static template tags completions
- Breakpoints doesn't work with extension HOT 1
- causes an error when using 'with' templating tag
- dant download
- clone https://github.com/vscode-django/vscode-django
- .py files not recognized
- .py files not recognized
- .py files not recognized
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-django.