Skip to content

Commit

Permalink
Rename Item::document property to shard to match LSIF spec
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Sep 22, 2022
1 parent e3afaf2 commit 6b0108f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lsif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ pub enum RangeTag {
#[serde(rename_all = "camelCase")]
#[serde(tag = "label")]
pub enum Vertex {
Capabilities(Capabilities),
MetaData(MetaData),
/// <https://github.com/Microsoft/language-server-protocol/blob/master/indexFormat/specification.md#the-project-vertex>
Project(Project),
Expand Down Expand Up @@ -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<ItemKind>,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6b0108f

Please sign in to comment.