[英]I have problem with VS Code auto complete class names in html
I have problem with VS Code auto complete classes names in html.我对 html 中的 VS Code 自动完成类名称有疑问。 When I add a class attribute to an element, it does not show the auto complete options for class names (value).
当我将 class 属性添加到元素时,它不会显示 class 名称(值)的自动完成选项。 I have tried many extensions and also tried "editor.suggestions" in.json file, but none of them solved the problem.
我尝试了许多扩展,也尝试了.json 文件中的“editor.suggestions”,但都没有解决问题。 So in html, when I want to use a class that I have already added I need to write it carefully so that it does not be wrong.
所以在html中,当我想使用一个我已经添加的class时,我需要仔细写,以免出错。 Could anyone help me with this problem, please?
有人可以帮我解决这个问题吗? By the way, I can access class name auto complete in css file.
顺便说一句,我可以在 css 文件中访问 class 名称自动完成。 My problem is that in an html file, I do not access my class names (auto complete) which are defined previously in the html file.
我的问题是在 html 文件中,我无法访问之前在 html 文件中定义的 class 名称(自动完成)。
I had the same issue, i needed only the classes auto-complete, so fixed the problem in the extension settings as below:我有同样的问题,我只需要类自动完成,所以在扩展设置中修复了这个问题,如下所示:
**/*.{css,html} to **/*.{css} **/*.{css,html} 到 **/*.{css}
I removed the 'html'.我删除了“html”。 And still autocomplete the classes.
并且仍然自动完成课程。
Hope this helped you well as me.希望这对你和我有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.