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

Intellisence does not pop up when using autocomplete for vue attributes #3245

Open
4 tasks done
jzymx50 opened this issue Nov 21, 2021 · 1 comment
Open
4 tasks done

Comments

@jzymx50
Copy link

jzymx50 commented Nov 21, 2021

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: Win
  • Vetur version: 0.35.0
  • VS Code version: 1.62.2

Problem

Intellisense will not work if you use autocomplete for vue attributes, such as v-if, @click. However, if you manually type v-if="", intellisense works properly.

Reproducible Case

Create a project with vue-cli, and try to use the intellisense in the default .vue file.

@jzymx50
Copy link
Author

jzymx50 commented Dec 1, 2021

Okay, finally I found out it was related to VS Code's settings. By default, IntelliSense will not be triggered before you fully complete the code snippet. (I am not sure whether the v-if autocomplete by Vetur is a kind of snippet or not. )

Therefore, if you want to use IntelliSense inside of code-snippet-generated vue attributes, such as v-if, @click, you have two options:

  • manually trigger the IntelliSense by typing Ctrl + Space
  • toggle the VS Code' setting snippetsPreventQuickSuggestions to be false 👇

image

VS Code set it true on purpose since Tab is used to confirm the selection in IntelliSense but also it is used to jump to the next cursor in the code snippets. (You may not want quick suggestions to pop up when tying i in, for example, a for loop snippet.)

I recommend mentioning this setting in the documentation for better user experience. ☺ @yoyo930021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants