Reputation: 4648
In VS Code when you import a module as an alias Intellisense suggests auto-completions, which appear to be Python path binaries.
For example, when I try and import pandas as pd
I get pdb
and pudb
as suggestions:
which, if I instinctively press enter on, results in import pandas as import pdb; pdb.set_trace()
, an error:
It seems to me that there should be no Intellisense at all for aliases because there is no "correct" alias for an imported library, and this is just a bug.
My question is, is there a way to disable Intellisense for cases like this?
I could press Esc or add a ;
and it will go away. I could also use a plain text editor, instead of an IDE.
Incidentally, someone tried to ask this question earlier but it was not phrased clearly and was closed Set up pandas as pd alias in vscode
Upvotes: 0
Views: 306
Reputation: 590
My question is, is there a way to disable Intellisense for cases like this?
Not that I am aware of. Maybe raise an issue on Github? 😁
These are the two settings that I use to get rid of annoying autocompletion except for tab-completion:
{
"editor.acceptSuggestionOnEnter": "off",
"editor.acceptSuggestionOnCommitCharacter": false,
}
Upvotes: 2