MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / kind_sort_tier

Function kind_sort_tier

src/completion/builder.rs:533–540  ·  view source on GitHub ↗

Return the sort tier for a `CompletionItemKind`. Lower values sort first. The order is: 0 — constants and keywords (`::class`) 1 — properties 2 — methods

(kind: Option<CompletionItemKind>)

Source from the content-addressed store, hash-verified

531/// 1 — properties
532/// 2 — methods
533fn kind_sort_tier(kind: Option<CompletionItemKind>) -> u8 {
534 match kind {
535 Some(CompletionItemKind::CONSTANT) | Some(CompletionItemKind::KEYWORD) => 0,
536 Some(CompletionItemKind::PROPERTY) => 1,
537 Some(CompletionItemKind::METHOD) => 2,
538 _ => 3,
539 }
540}
541
542/// Build a `tags` vec with the `DEPRECATED` tag when the member is deprecated.
543pub(crate) fn deprecation_tag(is_deprecated: bool) -> Option<Vec<CompletionItemTag>> {

Calls

no outgoing calls