10

So when I create a class for example in visual studio code, I can do it all manual and then code completion works just fine see image below:

enter image description here So in the image above I have typed all the code so far by hand NOT using any snippets.

But in the image below I created the class using a snipped see image below: enter image description here But When I fill in the required fields from the snippet code completion is not working. See image below:
enter image description here

So my question really is how do I get code completion / suggestions to work inside of the fields of a snippet? Or is this not possible in vscode?

If any clarification or extra information is needed let me know so I can add it!

FutureCake
  • 2,614
  • 3
  • 27
  • 70
  • Have you tried with [TAB] instead of [ENTER]? – Ivan García Topete Sep 06 '19 at 19:56
  • else try [CTRL] + [SPACE] – clankill3r Sep 06 '19 at 19:58
  • The highlighted text is only for typing the name of the class, when done, press [TAB] and the text won't be highlighted anymore you can come back to add inheritance | interfaces – Ivan García Topete Sep 06 '19 at 20:01
  • @IvanGarcíaTopete [TAB] just exits me out of the snippet.. :( – FutureCake Sep 06 '19 at 20:02
  • @clankill3r [CTRL] + [SPACE] yeah that works, but I was hoping for a way for VScode to do it automatically whilst typing. – FutureCake Sep 06 '19 at 20:02
  • @IvanGarcíaTopete yeah that is also possible but a bit of an inconvenience, and i was just hoping to make my life more convenient ;) – FutureCake Sep 06 '19 at 20:03
  • Duplicate of https://stackoverflow.com/questions/52847989/why-i-cant-use-intellisense-in-snippet-is-there-a-switch-that-can-be-controlle/52881972#52881972 Your answer is there. Because that answer was never accepted, this question cannot be flagged as a duplicate. – Mark Sep 06 '19 at 20:51
  • 1
    I moved my answer here so that hopefully it can be accepted and then I will mark the other linked question as a duplicate of this so that it can be properly closed. – Mark Sep 06 '19 at 20:55
  • Does this answer your question? [Intellisense not working in code snippets - VS Code](https://stackoverflow.com/questions/55683145/intellisense-not-working-in-code-snippets-vs-code) – starball Aug 04 '23 at 17:08

1 Answers1

15

Try changing this setting to false:

Editor › Suggest: Snippets Prevent Quick Suggestions

Control whether an active snippet prevents quick suggestions.

"editor.suggest.snippetsPreventQuickSuggestions": false

true is the default, sounds like you want false.

Mark
  • 143,421
  • 24
  • 428
  • 436