diff --git a/src/lsif.rs b/src/lsif.rs index 164d4eb..64a96f0 100644 --- a/src/lsif.rs +++ b/src/lsif.rs @@ -129,6 +129,7 @@ pub enum RangeTag { #[serde(rename_all = "camelCase")] #[serde(tag = "label")] pub enum Vertex { + Capabilities(Capabilities), MetaData(MetaData), /// Project(Project), @@ -260,6 +261,7 @@ pub enum ItemKind { #[derive(Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Item { + #[serde(rename = "shard")] pub document: Id, #[serde(skip_serializing_if = "Option::is_none")] pub property: Option, @@ -293,6 +295,19 @@ pub struct Project { pub kind: String, } +#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Capabilities { + pub hover_provider: bool, + pub declaration_provider: bool, + pub definition_provider: bool, + pub references_provider: bool, + pub type_definition_provider: bool, + pub document_symbol_provider: bool, + pub folding_range_provider: bool, + pub diagnostic_provider: bool, +} + #[derive(Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct MetaData {