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

Use sortText in completions #286

Merged
merged 4 commits into from
Jun 27, 2020
Merged

Use sortText in completions #286

merged 4 commits into from
Jun 27, 2020

Conversation

renkun-ken
Copy link
Member

Close #285

This PR uses CompletionItem.sortText defined in https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion to give different categories of completion items certain priorities.

The principle here is sorting by scope from local to global:

  1. Function arguments
  2. Scope symbols
  3. Workspace symbols
  4. Imported symbols
  5. Constants, Packages, Namespace symbols

@renkun-ken renkun-ken merged commit 1f20ab5 into master Jun 27, 2020
@randy3k randy3k deleted the sort-completion branch August 20, 2023 17:41
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.

Show function parameters at the top of the autocompletion
2 participants