GithubHelp home page GithubHelp logo

html issue about vscode-django HOT 10 OPEN

vscode-django avatar vscode-django commented on May 25, 2024
html issue

from vscode-django.

Comments (10)

trevordino avatar trevordino commented on May 25, 2024 7

Try adding the Emmet configuration into your settings.json file:
"emmet.includeLanguages": {"django-html": "html"},

from vscode-django.

max-cool avatar max-cool commented on May 25, 2024 6

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.

DaveParr avatar DaveParr commented on May 25, 2024 1

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.

max-cool avatar max-cool commented on May 25, 2024

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.

max-cool avatar max-cool commented on May 25, 2024

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.

DaveParr avatar DaveParr commented on May 25, 2024

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.

everspader avatar everspader commented on May 25, 2024

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.

jartaud avatar jartaud commented on May 25, 2024

@everspader me too. It seems that Emmet and this ext can't live together.

from vscode-django.

losquevedo avatar losquevedo commented on May 25, 2024

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.

almahdi404 avatar almahdi404 commented on May 25, 2024

#16

from vscode-django.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.