htmlvisual-studio-code

HTML files recognized as Django Template in VS Code


I'm new to VS Code, coming from ST3 and TextMate before that. A bit flummoxed why is HTML not autodetected nor is it offered as a choice of language after clicking on the lower-right language indicator?

Screenshot after selecting "Configure File Association for '.html'..."

I've tried explicitly adding "files.associations": {"*.html": "html"} to the User Settings to no effect.

Running VSCode v1.15.1 on macOS v10.12.6.


Solution

  • Include the following line of setting emmet.includeLanguages": {"django-html": "html"} in VSCode's settings.json:

    {
      "python.jediEnabled": false,
      "files.autoSave": "afterDelay",
      "editor.suggestSelection": "first",
      "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
      "editor.minimap.enabled": true,
      "workbench.colorTheme": "Monokai",
      "editor.largeFileOptimizations": false,
      "html.format.indentInnerHtml": true,
      "html.format.indentHandlebars": true,
      "emmet.includeLanguages": {
        "django-html": "html"
      },
      "[django-html]": {
    
      },
      "files.associations": {
        "*.html": "html"
      }
    }
    

    It does the fix for me on version 1.33.1