-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ab/lsp-autocomplete-super
- Loading branch information
Showing
6 changed files
with
114 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,39 @@ | ||
/// Sort text for "new" methods: we want these to show up before anything else, | ||
/// if we are completing at something like `Foo::` | ||
pub(super) fn new_sort_text() -> String { | ||
"3".to_string() | ||
"a".to_string() | ||
} | ||
|
||
/// This is the default sort text. | ||
pub(super) fn default_sort_text() -> String { | ||
"5".to_string() | ||
"b".to_string() | ||
} | ||
|
||
/// We want crates and modules to show up after other things (for example | ||
/// local variables, functions or types) | ||
pub(super) fn crate_or_module_sort_text() -> String { | ||
"c".to_string() | ||
} | ||
|
||
/// Sort text for auto-import items. We want these to show up after local definitions. | ||
pub(super) fn auto_import_sort_text() -> String { | ||
"6".to_string() | ||
"d".to_string() | ||
} | ||
|
||
/// When completing something like `Foo::`, we want to show methods that take | ||
/// self after the other ones. | ||
pub(super) fn self_mismatch_sort_text() -> String { | ||
"7".to_string() | ||
"e".to_string() | ||
} | ||
|
||
/// We want to show operator methods last. | ||
pub(super) fn operator_sort_text() -> String { | ||
"8".to_string() | ||
"f".to_string() | ||
} | ||
|
||
/// If a name begins with underscore it's likely something that's meant to | ||
/// be private (but visibility doesn't exist everywhere yet, so for now | ||
/// we assume that) | ||
pub(super) fn underscore_sort_text() -> String { | ||
"9".to_string() | ||
"g".to_string() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters