相关疑难解决方法(0)

有没有办法使Visual Studio代码识别PHP文件中的HTML语法

我在Mac上使用Visual Studio Code来处理WordPress应用程序.

有没有办法让Visual Studio代码识别HTML并在PHP文件中使用它的功能(主要是自动完成)?

我之前已经搜索过这个答案,但只是被告知转到Visual Studio代码设置: File >> Preferences >> User Settings

// 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": {"*.php": "html"}     
 }
Run Code Online (Sandbox Code Playgroud)

但这样做会让您失去所有PHP支持和自动完成功能.

我希望微软能够意识到PHP开发人员在创建应用程序/网站时通常会同时使用PHP和HTML.如果可能的话,我很乐意使用VS Code而不是华丽但昂贵的PHP风暴.

html php autocomplete visual-studio-code

11
推荐指数
2
解决办法
3802
查看次数

标签 统计

autocomplete ×1

html ×1

php ×1

visual-studio-code ×1