Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit b97f025

Browse files
committed
Support new Union variants from Racer
1 parent 4f47b20 commit b97f025

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

rls/src/actions/hover.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ fn racer_match_to_def(ctx: &InitActionContext, m: &racer::Match) -> Option<Def>
546546
fn to_def_kind(kind: &MatchType) -> DefKind {
547547
match kind {
548548
MatchType::Struct(_) => DefKind::Struct,
549+
MatchType::Union(_) => DefKind::Union,
549550
MatchType::Module => DefKind::Mod,
550551
MatchType::MatchArm => DefKind::Local,
551552
MatchType::Function | MatchType::Method(_) => DefKind::Function,

rls/src/lsp_data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ pub fn completion_kind_from_match_type(m: racer::MatchType) -> CompletionItemKin
161161
match m {
162162
racer::MatchType::Crate | racer::MatchType::Module => CompletionItemKind::Module,
163163
racer::MatchType::Struct(_) => CompletionItemKind::Class,
164+
racer::MatchType::Union(_) => CompletionItemKind::Struct,
164165
racer::MatchType::Enum(_) => CompletionItemKind::Enum,
165166
racer::MatchType::StructField | racer::MatchType::EnumVariant(_) => {
166167
CompletionItemKind::Field

0 commit comments

Comments
 (0)