Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have auto-import suggestions for popular abbreviations #1837

Closed
Rizhiy opened this issue May 7, 2021 · 1 comment
Closed

Have auto-import suggestions for popular abbreviations #1837

Rizhiy opened this issue May 7, 2021 · 1 comment

Comments

@Rizhiy
Copy link

Rizhiy commented May 7, 2021

Is your feature request related to a problem? Please describe.
Many module names are too long and most people abbreviate them to something short, e.g numpy to np.
Unfortunately, pyright doesn't suggest auto-import for these abbreviations, would be nice if it did.

Describe the solution you'd like
Remember common abbreviations and use them to check for auto-import suggestions.
Might also be a good idea to let user define their own list.

Additional context
Common abbreviations that I've seen being used:

numpy -> np
pandas -> pd
matplotlib.pyplot -> plt
datetime -> dt
@erictraut
Copy link
Collaborator

This functionality is already provided by pylance, and we don't plan to replicate this functionality in pyright. While pyright does contain some simple language server features, it's primarily a type checker. More advanced language features like source indexing and abbreviation support for auto-completion are beyond the scope of pyright.

heejaechang pushed a commit to heejaechang/pyright that referenced this issue Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants