Skip to content

Addresses issue #40 - improved parameter completion list order #124

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

Conversation

rkeithhill
Copy link
Contributor

This takes advantage of the fact that PowerShell returns us a list of parameter names already in the preferred order (common params at the end). We just need to make the SortText for each completion result preserve the initial order.

This takes advantage of the fact that PowerShell returns us a list of parameter names already in the preferred order (common params at the end).  We just need to make the SortText for each completion result preserve the initial order.
@rkeithhill
Copy link
Contributor Author

Forgot to mention. This only works with a >= 0.10.7-insiders build of VSCode.

@@ -1031,6 +1034,18 @@ private static CompletionItemKind MapCompletionKind(CompletionType completionTyp
}
}

// We want a special "sort order" for parameters that is not lexicographical.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent comment, thank you!

@daviwil
Copy link
Contributor

daviwil commented Feb 2, 2016

Argh, that debug adapter test is really starting to annoy me. Your change is great though, merging it!

daviwil added a commit that referenced this pull request Feb 2, 2016
…-completion-sorting

Addresses issue #40 - improved parameter completion list order
@daviwil daviwil merged commit 2fcd1e0 into PowerShell:master Feb 2, 2016
@rkeithhill rkeithhill deleted the rkeithhill/is40-improve-param-completion-sorting branch February 2, 2016 22:45
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
This change adds support for loading both host-specific and host-agnostic
profile scripts for both the current user and all users on the same
system.  For VS Code, the profile names are Microsoft.VSCode_profile.ps1
and profile.ps1.  The new 'enableProfileLoading' setting controls whether
profiles are loaded automatically when the language server starts up.  For
now this setting is turned off by default.

Resolves PowerShell#124.
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

Successfully merging this pull request may close these issues.

3 participants