Skip to content

Commit

Permalink
Rename document field to shard
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Sep 22, 2022
1 parent 151844d commit 96569ff
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 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,8 +261,7 @@ pub enum ItemKind {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Item {
#[serde(rename = "shard")]
pub document: Id,
pub shard: Id,
#[serde(skip_serializing_if = "Option::is_none")]
pub property: Option<ItemKind>,
#[serde(flatten)]
Expand Down Expand Up @@ -294,6 +294,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 96569ff

Please sign in to comment.