Description
I have a project that provides completions for the class
attribute using custom data format. Volar provides those completions (aaa
) when class attribute value is empty or after a space but not when there is already a character inserted (even if it matches the completion).
Here is a screencast (it's supposed provide both aaa
and aaa-local
in both cases:
Screen.Recording.2024-03-13.at.14.51.31.mov
Note also the inconsistent behavior with providing component-local aaa-scoped
completion. It's provided when the custom data completions are not provided and vice-versa.
Note2: In the 2.0.6 version the component-local classes are not suggested at all which seems like a separate bug. I've made the video using 1.x version.
Steps:
- Clone repo: https://github.com/rchl/vue-completions-bug
- install dependencies
- Open
App.vue
- Trigger completions within the
class
attribute when value is
a) empty
b) "a"
The issue is most likely around https://github.com/volarjs/volar.js/blob/15cf7fd2940938fb47c33a1db98d0173168064ee/packages/language-service/lib/languageFeatures/complete.ts#L150-L154 where it exits early and doesn't ask services for completions.