aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-03-17 14:41:40 +0000
committerPhilipp Mildenberger2023-05-18 19:48:32 +0000
commit19f88fc5778b394b90dd9dec89fe3618c252b191 (patch)
tree12239bab593feaa02eb6dad45e7899113af2467f /helix-core
parentf9b08656f41cbb9573ffb144f5dc2e24ea764ac9 (diff)
Simplify Display implementation of LanguageServerFeature
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs38
1 files changed, 19 insertions, 19 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index ff4bb6c2..f45a38cc 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -237,25 +237,25 @@ pub enum LanguageServerFeature {
impl Display for LanguageServerFeature {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- match self {
- LanguageServerFeature::Format => write!(f, "format"),
- LanguageServerFeature::GotoDeclaration => write!(f, "goto-declaration"),
- LanguageServerFeature::GotoDefinition => write!(f, "goto-definition"),
- LanguageServerFeature::GotoTypeDefinition => write!(f, "goto-type-definition"),
- LanguageServerFeature::GotoReference => write!(f, "goto-type-definition"),
- LanguageServerFeature::GotoImplementation => write!(f, "goto-implementation"),
- LanguageServerFeature::SignatureHelp => write!(f, "signature-help"),
- LanguageServerFeature::Hover => write!(f, "hover"),
- LanguageServerFeature::DocumentHighlight => write!(f, "document-highlight"),
- LanguageServerFeature::Completion => write!(f, "completion"),
- LanguageServerFeature::CodeAction => write!(f, "code-action"),
- LanguageServerFeature::WorkspaceCommand => write!(f, "workspace-command"),
- LanguageServerFeature::DocumentSymbols => write!(f, "document-symbols"),
- LanguageServerFeature::WorkspaceSymbols => write!(f, "workspace-symbols"),
- LanguageServerFeature::Diagnostics => write!(f, "diagnostics"),
- LanguageServerFeature::RenameSymbol => write!(f, "rename-symbol"),
- LanguageServerFeature::InlayHints => write!(f, "inlay-hints"),
- }
+ write!(f, "{}", match self {
+ LanguageServerFeature::Format => "format",
+ LanguageServerFeature::GotoDeclaration => "goto-declaration",
+ LanguageServerFeature::GotoDefinition => "goto-definition",
+ LanguageServerFeature::GotoTypeDefinition => "goto-type-definition",
+ LanguageServerFeature::GotoReference => "goto-type-definition",
+ LanguageServerFeature::GotoImplementation => "goto-implementation",
+ LanguageServerFeature::SignatureHelp => "signature-help",
+ LanguageServerFeature::Hover => "hover",
+ LanguageServerFeature::DocumentHighlight => "document-highlight",
+ LanguageServerFeature::Completion => "completion",
+ LanguageServerFeature::CodeAction => "code-action",
+ LanguageServerFeature::WorkspaceCommand => "workspace-command",
+ LanguageServerFeature::DocumentSymbols => "document-symbols",
+ LanguageServerFeature::WorkspaceSymbols => "workspace-symbols",
+ LanguageServerFeature::Diagnostics => "diagnostics",
+ LanguageServerFeature::RenameSymbol => "rename-symbol",
+ LanguageServerFeature::InlayHints => "inlay-hints",
+ })
}
}