Skip to content

Commit 96569ff

Browse files
committed
Rename document field to shard
1 parent 151844d commit 96569ff

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/lsif.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ pub enum RangeTag {
129129
#[serde(rename_all = "camelCase")]
130130
#[serde(tag = "label")]
131131
pub enum Vertex {
132+
Capabilities(Capabilities),
132133
MetaData(MetaData),
133134
/// <https://github.com/Microsoft/language-server-protocol/blob/master/indexFormat/specification.md#the-project-vertex>
134135
Project(Project),
@@ -260,8 +261,7 @@ pub enum ItemKind {
260261
#[derive(Debug, PartialEq, Serialize, Deserialize)]
261262
#[serde(rename_all = "camelCase")]
262263
pub struct Item {
263-
#[serde(rename = "shard")]
264-
pub document: Id,
264+
pub shard: Id,
265265
#[serde(skip_serializing_if = "Option::is_none")]
266266
pub property: Option<ItemKind>,
267267
#[serde(flatten)]
@@ -294,6 +294,19 @@ pub struct Project {
294294
pub kind: String,
295295
}
296296

297+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
298+
#[serde(rename_all = "camelCase")]
299+
pub struct Capabilities {
300+
pub hover_provider: bool,
301+
pub declaration_provider: bool,
302+
pub definition_provider: bool,
303+
pub references_provider: bool,
304+
pub type_definition_provider: bool,
305+
pub document_symbol_provider: bool,
306+
pub folding_range_provider: bool,
307+
pub diagnostic_provider: bool,
308+
}
309+
297310
#[derive(Debug, PartialEq, Serialize, Deserialize)]
298311
#[serde(rename_all = "camelCase")]
299312
pub struct MetaData {

0 commit comments

Comments
 (0)