vscode中让html中php代码高亮

找到设置中的文件设置中的files.associations,增加以下内容(注意一下内容要放在右侧的用户设置中,而不是放在中间的默认设置中):

{

// Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.

"files.associations": {"*.html": "php"}

}

这样就可以在扩展名为html的文件中识别PHP代码了

 

猜你喜欢

转载自www.cnblogs.com/wordblog/p/11518072.html