vuejs/language-tools

Built-in Component name color

Zenthae opened this issue ยท 3 comments

Hello ๐Ÿ‘‹,

The built-in component component syntax highlighting is wrong.

image

image

Volar: 0.27.18
VSCode : 1.60

Hi @Zenthae, vue only provide these built-in type but no <component>: https://github.com/johnsoncodehk/volar/blob/34318d21e78d7688f3411b3fd8e5e5cd7cb4fbc5/packages/vscode-vue-languageservice/src/utils/globalDoc.ts#L44-L48

If color is a problem to you, you can define component to GlobalComponents interface to patch the problem, see https://github.com/johnsoncodehk/volar#using.

// components.d.ts
declare module '@vue/runtime-core' {
	export interface GlobalComponents {
		component: (props: { is: Component }) => void
	}
}

export { }

But shouldn't this be fix in Vue itself?

But shouldn't this be fix in Vue itself?

These types is not a purpose for IDE type-checking, I just stole it for now.
I think this problem should be resolve by vuejs/core#3399.