Skip to content

Commit

Permalink
Prioritize lower case over upper
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Sep 20, 2024
1 parent 460246f commit 248c52d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/completion/completer/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function entryEnvToCompletion(item: EnvironmentInfo, type: EnvSnippetType): CmdE
if (item.package) {
suggestion.documentation += ` From package: ${item.package}.`
}
suggestion.sortText = label.replace(/([A-Z])/g, '$10').toLowerCase()
suggestion.sortText = label.replace(/([a-z])/g, '$10').toLowerCase()

if (type === EnvSnippetType.AsName) {
return suggestion
Expand Down
2 changes: 1 addition & 1 deletion src/completion/completer/macro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ function entryCmdToCompletion(item: MacroRaw, packageName?: string, postAction?:
suggestion.documentation += ` From package: ${packageName}.`
}
suggestion.sortText = (item.name + (item.arg?.format ?? ''))
.replace(/([A-Z])/g, '$10').toLowerCase()
.replace(/([a-z])/g, '$10').toLowerCase()
.replaceAll('{', '0')
.replaceAll('[', '1')
.replaceAll('(', '2')
Expand Down

0 comments on commit 248c52d

Please sign in to comment.