Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio code - Intellisense auto complete behaviour

I'm pretty new to Visual studio code. I am using Visual studio code for AngularJS application development. As I am from a .NET development background, I'm much fond of intellisense feature in visual studio code. But I could feel something is missing in this. When I type any Object name, autocomplete box pops up with suggestion, when I select the respective item and press period, the object name is not complete. Example: assume the object name is SampleObject. When I start typing "Sam", suggestion pop up lists "SampleObject". Once I select this name and press period, the output is "Sam." and not as "SampleObject." Any setting has to be added for the expected behaviour? Your help is much appreciated.

Thanks.

like image 644
Sakthirajesh N Avatar asked Dec 14 '22 06:12

Sakthirajesh N


1 Answers

I posted the same query in VScode git hub issues forum. I got the following reply.

You can add the snippet below to your keyboard shortcut configuration to the VS Code to accept a suggestion and insert the dot when pressing .

{ "key": ".", "command": "^acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey && editorLangId == 'javascript'" }

This worked.

like image 104
Sakthirajesh N Avatar answered Mar 21 '23 00:03

Sakthirajesh N