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

Remove or disable code snippets #14781

Closed
jakebailey opened this issue Nov 19, 2020 · 3 comments · Fixed by #15006
Closed

Remove or disable code snippets #14781

jakebailey opened this issue Nov 19, 2020 · 3 comments · Fixed by #15006
Assignees
Labels
area-editor-* User-facing catch-all feature-request Request for new features or functionality

Comments

@jakebailey
Copy link
Member

jakebailey commented Nov 19, 2020

This is more of an anti-feature request; I'm proposing that the code snippets included in the extension be removed, or at least that the default snippetSuggestions setting for Python be set to "none".

The code snippets were likely useful before good quality analysis. These days, we have LSs that provide completions for things like overriding methods, and I'm a bit suspicious of the usefulness of the other snippets (like "add an if statement").

The code snippets use regex rules (if any rules at all) and often lead to undesirable behavior when offered in the wrong context. This is worse when an LS explicitly returns "nothing", and VS Code adds the snippets in making the completion list just snippets. This leads to bugs being reported thinking that it's an issue with the LS, when it's really VS Code injecting the rules. They also get fuzzy matched, which makes them more likely to be selected.

See these (there's another Pylance one I'm having trouble finding):

@jakebailey jakebailey added feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team labels Nov 19, 2020
@ericsnowcurrently ericsnowcurrently added area-editor-* User-facing catch-all needs decision and removed triage-needed Needs assignment to the proper sub-team labels Nov 23, 2020
@ericsnowcurrently
Copy link
Member

Relates to #14566.

@jakebailey
Copy link
Member Author

Ah, yes, thanks. No wonder I couldn't find the issue; I had transferred it here.

@jakebailey
Copy link
Member Author

The recently transferred microsoft/pylance-release#741 is also a case of this. Note that we have other issues due to VS Code's "word completion" as well: microsoft/pylance-release#604

So this wouldn't fix everything, and we probably need to do more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants