Closed
Description
What problem does this feature solve?
vuejs/core#3399 has landed in Vue 3.5, and the GlobalDirectives
interface exists, but Volar does not seem to populate directive completions from the the GlobalDirectives
interface.
On a fresh project created with pnpm create vue@latest
, with VSCode, adding the module declaration
declare module 'vue' {
interface GlobalDirectives{
vHelloWorld: any;
}
}
(in App.vue
) enables type hints and jump to definition (at least to the module declaration) on the directive in Vue SFCs, but the completion popup when attempting to use the directive does not include v-hello-world
.
I only managed to make the directive completion work when doing
declare module 'vue' {
interface ComponentCustomProperties {
vHelloWorld: any;
}
}
What does the proposed solution look like?
Volar should provide completion for global directives declared in the GlobalDirectives
interface.