Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal String Union Autocomplete now working inside .vue file #2300

Closed
3 tasks done
tuan-lm97 opened this issue Sep 21, 2020 · 5 comments · Fixed by #2353
Closed
3 tasks done

Literal String Union Autocomplete now working inside .vue file #2300

tuan-lm97 opened this issue Sep 21, 2020 · 5 comments · Fixed by #2353

Comments

@tuan-lm97
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Win10 Home
  • Vetur version: 0.27.3
  • VS Code version: 1.49.1

Problem

Autocomplete for string literal union type not working inside .vue file (with <script lang="ts"> ). But working just fine inside .ts file.

Working nice in test.ts
working

No autocomplete, only information in test.vue
not_working

Reproducible Case

Declare any kind of type with string literal union type.
Expected: Give autocomplete just as in a .ts file.
Reality: No autocomplete in .vue file

Note: I'm not really sure where to post this: vue, vetur or vscode. And i also not really sure whether this should be a bug report or feature request. But since in the vetur doc they said that

The IntelliSense should be almost the same to the IntelliSense in js/ts files
So maybe this is the right place to post this.

@octref
Copy link
Member

octref commented Sep 21, 2020

aaff6be

I cannot recall why I made this change. I'll revert it for now. If I do encounter the bug I'll fix it again...

@octref
Copy link
Member

octref commented Sep 21, 2020

I remember the reason now...

If I do make ' a trigger character, when I type over 'black'|, I get unwanted completion.

image

I'll have to find another fix.

@octref octref reopened this Sep 21, 2020
@octref octref closed this as completed in 46c3e31 Sep 21, 2020
@tuan-lm97
Copy link
Author

tuan-lm97 commented Sep 22, 2020

@octref Have you been able to fix it without giving unwanted completion ?
How about make ' and " a trigger character only if they are immediately after a ( ?
Also how about open this issue because I don't think it have really been fix ?

@octref octref reopened this Sep 23, 2020
@octref
Copy link
Member

octref commented Sep 23, 2020

I forgot to reopen.

@tuan-lm
Copy link

tuan-lm commented Oct 1, 2020

@octref any news on this ?
In the meantime i think i would rather has that unwanted completion than not auto-complete at all.
Literal String Union is a great way to restraint option, I use them alot and auto-complete will help alot in vue file.
Unwanted completion can be cancel with a simple Esc. The benefit outweight the uncomfortable IMO

yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 6, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 6, 2020
octref pushed a commit to yoyo930021/vuter that referenced this issue Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants