Simplify Display implementation of LanguageServerFeature

Co-authored-by: Ivan Tham <pickfire@riseup.net>
pull/2507/head
Philipp Mildenberger 2 years ago
parent f9b08656f4
commit 19f88fc577

@ -237,25 +237,25 @@ pub enum LanguageServerFeature {
impl Display for LanguageServerFeature { impl Display for LanguageServerFeature {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self { write!(f, "{}", match self {
LanguageServerFeature::Format => write!(f, "format"), LanguageServerFeature::Format => "format",
LanguageServerFeature::GotoDeclaration => write!(f, "goto-declaration"), LanguageServerFeature::GotoDeclaration => "goto-declaration",
LanguageServerFeature::GotoDefinition => write!(f, "goto-definition"), LanguageServerFeature::GotoDefinition => "goto-definition",
LanguageServerFeature::GotoTypeDefinition => write!(f, "goto-type-definition"), LanguageServerFeature::GotoTypeDefinition => "goto-type-definition",
LanguageServerFeature::GotoReference => write!(f, "goto-type-definition"), LanguageServerFeature::GotoReference => "goto-type-definition",
LanguageServerFeature::GotoImplementation => write!(f, "goto-implementation"), LanguageServerFeature::GotoImplementation => "goto-implementation",
LanguageServerFeature::SignatureHelp => write!(f, "signature-help"), LanguageServerFeature::SignatureHelp => "signature-help",
LanguageServerFeature::Hover => write!(f, "hover"), LanguageServerFeature::Hover => "hover",
LanguageServerFeature::DocumentHighlight => write!(f, "document-highlight"), LanguageServerFeature::DocumentHighlight => "document-highlight",
LanguageServerFeature::Completion => write!(f, "completion"), LanguageServerFeature::Completion => "completion",
LanguageServerFeature::CodeAction => write!(f, "code-action"), LanguageServerFeature::CodeAction => "code-action",
LanguageServerFeature::WorkspaceCommand => write!(f, "workspace-command"), LanguageServerFeature::WorkspaceCommand => "workspace-command",
LanguageServerFeature::DocumentSymbols => write!(f, "document-symbols"), LanguageServerFeature::DocumentSymbols => "document-symbols",
LanguageServerFeature::WorkspaceSymbols => write!(f, "workspace-symbols"), LanguageServerFeature::WorkspaceSymbols => "workspace-symbols",
LanguageServerFeature::Diagnostics => write!(f, "diagnostics"), LanguageServerFeature::Diagnostics => "diagnostics",
LanguageServerFeature::RenameSymbol => write!(f, "rename-symbol"), LanguageServerFeature::RenameSymbol => "rename-symbol",
LanguageServerFeature::InlayHints => write!(f, "inlay-hints"), LanguageServerFeature::InlayHints => "inlay-hints",
} })
} }
} }

Loading…
Cancel
Save