Solution to the problem that vscode does not support nvue syntax highlighting

Project scenario:

Project scenario: When developing uniapp with vscode, you will encounter the problem of developing with .nvue. However, vscode does not provide syntax highlighting for .nvue. This article is for readers who have just used vscode to write .nvue.


Problem Description

For example: using *.nvue in vscode cannot recognize the file type and there is no syntax highlighting,
as shown in the figure:
Insert image description here


Cause Analysis:

The plug-in I use here is Volar supported by vue3 syntax. There are overwhelming vetur solutions on the Internet. In fact, it only needs to be configured with vscode.


solution:

The configuration is as shown in the figure

Insert image description here

Solution effect

Insert image description here

Guess you like

Origin blog.csdn.net/wz9608/article/details/129195561