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

后端 未结 7 1746
被撕碎了的回忆
被撕碎了的回忆 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:43

    Go to Visual Studio Code Settings. File >> Preferences >> User Settings

    Add this line in the settings.json.

    // Place your settings in this file to overwrite the default settings
    {                
        // Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.
        "files.associations": {"*.ejs": "html"}     
    }
    

    Restart Visual Studio Code.

提交回复
热议问题