Is there a way to make Visual Studio Code recognize HTML syntax in EJS files

后端 未结 7 1733
被撕碎了的回忆
被撕碎了的回忆 2021-01-31 07:20

I am using Visual Studio Code on a Mac to work on Node.js applications.

Is there a way to make Visual Studio Code recognize EJS files as HTML markup? I didn\'t see any

7条回答
  •  伪装坚强ぢ
    2021-01-31 07:31

    Following the directions given by documentation I changed this file c:\Program Files(x86)\Microsoft VS Code\resources\app\extensions\html\package.json so it looks like this:

    {
        "name": "html",
        "version": "0.1.0",
        "publisher": "vscode",
        "engines": { "vscode": "*" },
        "extensionDependencies": [
                         "html"
                    ],
        "contributes": {
            "languages": [{
                "id": "html",
                "aliases": ["ejs"],
                "extensions": [".ejs"]
            }]
        }
    }
    

    tried..works for me..too lazy to create a new folder atm

提交回复
热议问题