How to solve the code completion failure after Vue3+Vite+TS installs the volar plug-in?

Recently, I am using Vue3+Vite+TS to write code, but I have encountered a problem, that is, after installing volar, the automatic completion of HTML tags is invalid. How to solve this problem?

When using Vue2, we installed the vetur plug-in, which can help us do some code highlighting tips, which greatly improves our development efficiency.

 When using Vue3, we installed the volar plugin

 But in the process of using it, I found that when writing HTML tags in the template, the code completion function is invalid and can only be entered manually, while the writing of JS and TS can normally have code prompts

In order to clarify this problem, I also tried it out, disabled Volar, and turned on vetur. Sure enough, the code can be automatically prompted again. When vetur is disabled again and volar is enabled, the code completion fails again, so it is The reason caused by volar, how to solve it so that there are code hints, is there any brother who can solve it, thank you

おすすめ

転載: blog.csdn.net/weixin_48914380/article/details/127907812
おすすめ