From 42115d02bc9236adf7d1aa81029ca6a12856a160 Mon Sep 17 00:00:00 2001 From: Erasin Date: Tue, 26 Jul 2022 09:26:50 +0800 Subject: Suport diagnostic code (#3096) * add code for diagnostic. This PR provides a solution to resolve #2994. missing Code Actions for lsp * remote unused import--- helix-core/src/diagnostic.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'helix-core/src') diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs index 210ad639..48a68dc0 100644 --- a/helix-core/src/diagnostic.rs +++ b/helix-core/src/diagnostic.rs @@ -23,6 +23,12 @@ pub struct Range { pub end: usize, } +#[derive(Debug, Eq, Hash, PartialEq, Clone, Deserialize, Serialize)] +pub enum NumberOrString { + Number(i32), + String(String), +} + /// Corresponds to [`lsp_types::Diagnostic`](https://docs.rs/lsp-types/0.91.0/lsp_types/struct.Diagnostic.html) #[derive(Debug, Clone)] pub struct Diagnostic { @@ -30,4 +36,5 @@ pub struct Diagnostic { pub line: usize, pub message: String, pub severity: Option, + pub code: Option, } -- cgit v1.2.3-70-g09d2