skip to Main Content

Is there a way to have a proper django syntax highlight in vscode when using django template tag in a tag in templates ?

2

Answers


  1. Well, i would say just download the Django extension from Baptiste Darthenay. From what I’ve seen it and what I’ve understand it’s what you are looking for.

    Login or Signup to reply.
  2. Like @HotTeaPot said, I would recommend vscode-django extension by Baptiste Darthenay for syntax highlighting and snippets along with djlint for formatting.

    You can ignore errors through a .djlintrc file.

    // .djlintrc
    
    {
        "ignore": "T002,H020,H031,H030"
    }
    
    

    Include the snippet below in your USER settings.json to extend html emmet-completions in django-html.

    // settings.json
    
      "emmet.includeLanguages": {
        "django-html": "html",
        "jinja-html": "html"
      },
    

    Happy coding!!!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search