I want to use code snippets in VSCode. But when I type, for example, for
in javascript file, the Intellisense doesn't suggest snippet "for-loop" - I need to manually scroll the dropdown and select it. Is there any way to make VSCode to suggest snippets at first? Thank you!
UPD: I have found the person with same problem, but he has no answers - link
You need to use editor.snippetSuggestions
config option with "top"
value. Please, see Customizing IntelliSense article for more tips and tricks.
There is one more way to deal with this issue by setting "editor.tabCompletion": true, that way whenever there is a snnipet available it will use it automatically without even opening the list by using tab twice.
- File > Preferences > Settings (Code > Preferences > Settings on Mac)
- open "Editor" menu on the left
- edit "editor.tabCompletion": true
more info: https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense
来源:https://stackoverflow.com/questions/37863609/vs-code-intellisense-dont-suggest-snippet-at-first