Ste*_*pUp 2 html visual-studio-code vscode-settings
我已经下载了最新的Visual Studio代码,并尝试编写一些HTML代码。例如,<div>, <a>, <p>
标签。但是,Visual Studio Code中没有HTML建议:
我读了这篇文章,上面写着:
Visual Studio Code开箱即用地提供了对HTML编程的基本支持。
但是,我尝试安装HTML扩展名:
此外,我已经在settings.json
文件中启用了HTML5建议:
{
"workbench.colorTheme": "Visual Studio Light",
"workbench.activityBar.visible": true,
"editor.multiCursorModifier": "ctrlCmd",
"window.zoomLevel": 0,
"html.suggest.html5": true,
}
Run Code Online (Sandbox Code Playgroud)
但是,HTML,CSS建议不起作用。
我该怎么做才能提出建议?
我认为问题是Visual Studio Code无法正确检测文件类型。如果您在这些图片中注意到,vscode已正确检测到我正在通过<>
文件名和屏幕右下方的语言指示符旁边的图标编写html文件。
语言指示器最有可能plain text
针对您的情况进行说明。单击它,菜单应该出现在屏幕的顶部中心。然后尝试以下操作:
Auto Detect
。我认为这将是第一选择。Configure File Association for '.html'...
2也可以通过添加
“ files.associations”:{“ * .html”:“ html”}
您的设置。
或者只是添加到settings.json (File -> Preferences -> Settings)
:
{
// Configure file associations to languages (e.g. "*.extension": "html"). These have
//precedence over the default associations of the languages installed.
"files.associations": { "*.html": "html" },
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1823 次 |
最近记录: |