BrainPermafrost
BrainPermafrost

Reputation: 674

How to get VS Code to list methods of object when multiple extensions are competing for tab complete

In VS Code, when writing the name of a method on an object, it seems to take a while for the method menu to pop up. I also am using github copilot, which is great, but it's suggestions often show first and I don't see the menu for the methods until I type some more letters.

Example, let's say I have the following line of code:

my_json = My_Class(id=5).

and I want to type the name of the method that returns some json. Gitlab copilot might suggest something like the following, where the 'get_json' portion is in grey and available for tab complete.

my_json = My_Class(id=5).get_json()

But, let's say the correct name for the method is 'get_object_json', I would have to type the following before the object method/attribute menu pops up

my_json = My_Class(id=5).get_o

Is there a way to manually open the object method/attribute menu? A keyboard shortcut? So that I can open it right after I have typed the period?

Similarly, sometimes I DO want the GitHub suggestion but, right as I hit tab, Pylance IntelliSense replaces the tab complete with the name of some variable or library, or global (i.e. some built-in exception class).

It would be great if there was a way to assign a specific key combo for tab complete of GitHub copilot. Like tab-option, or something, that will only complete the github copilot suggestion, if there is one.

Upvotes: 1

Views: 649

Answers (1)

VonC
VonC

Reputation: 1325047

It would be great if there was a way to assign a specific key combo for tab complete of GitHub copilot.

As I know of are the "Keyboard shortcuts for GitHub Copilot".

They do include:

Trigger inline suggestion Alt+</kbd>: editor.action.inlineSuggest.trigger

Otherwise, in your case, Esc can dismiss a GitHub Copilot suggestion, after which you can type '.' and see if the "normal" completion takes place.

Upvotes: 0

Related Questions