Skip to content

Commit

Permalink
Merge pull request #213 from latex-lsp/dependabot/cargo/lsp-types-0.74.0
Browse files Browse the repository at this point in the history
Bump lsp-types from 0.73.0 to 0.74.0
  • Loading branch information
efoerster authored Apr 28, 2020
2 parents d3f7a0e + ecfb086 commit 7a88e59
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 36 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/texlab_completion/src/bibtex/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ mod tests {
use super::*;
use indoc::indoc;
use texlab_feature::FeatureTester;
use texlab_protocol::Range;
use texlab_protocol::{CompletionTextEditExt, Range};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -112,6 +112,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 1, 1, 2)
Expand Down
3 changes: 3 additions & 0 deletions crates/texlab_completion/src/bibtex/entry_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl BibtexEntryTypeCompletionProvider {
mod tests {
use super::*;
use texlab_feature::FeatureTester;
use texlab_protocol::CompletionTextEditExt;

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -112,6 +113,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 1, 0, 1)
Expand All @@ -132,6 +134,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 1, 0, 4)
Expand Down
5 changes: 4 additions & 1 deletion crates/texlab_completion/src/bibtex/field_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ mod tests {
use super::*;
use indoc::indoc;
use texlab_feature::FeatureTester;
use texlab_protocol::Range;
use texlab_protocol::{CompletionTextEditExt, Range};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -113,6 +113,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 0, 1, 3)
Expand All @@ -133,6 +134,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 27, 0, 30)
Expand Down Expand Up @@ -161,6 +163,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 0, 1, 0)
Expand Down
32 changes: 16 additions & 16 deletions crates/texlab_completion/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn command(
kind: Some(adjust_kind(req, Structure::Command.completion_kind())),
data: Some(CompletionItemData::Command.into()),
documentation: image.and_then(|image| image_documentation(&req, &name, image)),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::new_simple(name, detail)
}
}
Expand Down Expand Up @@ -121,7 +121,7 @@ pub fn environment(
CompletionItem {
kind: Some(adjust_kind(req, Structure::Environment.completion_kind())),
data: Some(CompletionItemData::Environment.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::new_simple(name, component.detail())
}
}
Expand Down Expand Up @@ -158,7 +158,7 @@ pub fn label(
label: name,
kind: Some(adjust_kind(req, kind)),
data: Some(CompletionItemData::Label.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
filter_text,
detail,
documentation,
Expand All @@ -175,7 +175,7 @@ pub fn folder(
label: path.file_name().unwrap().to_string_lossy().into_owned(),
kind: Some(adjust_kind(req, Structure::Folder.completion_kind())),
data: Some(CompletionItemData::Folder.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -189,7 +189,7 @@ pub fn file(
label: path.file_name().unwrap().to_string_lossy().into_owned(),
kind: Some(adjust_kind(req, Structure::File.completion_kind())),
data: Some(CompletionItemData::File.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -203,7 +203,7 @@ pub fn pgf_library(
label: name.into(),
kind: Some(adjust_kind(req, Structure::PgfLibrary.completion_kind())),
data: Some(CompletionItemData::PgfLibrary.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -217,7 +217,7 @@ pub fn tikz_library(
label: name.into(),
kind: Some(adjust_kind(req, Structure::TikzLibrary.completion_kind())),
data: Some(CompletionItemData::TikzLibrary.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -231,7 +231,7 @@ pub fn color(
label: name.into(),
kind: Some(adjust_kind(req, Structure::Color.completion_kind())),
data: Some(CompletionItemData::Color.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -245,7 +245,7 @@ pub fn color_model(
label: name.into(),
kind: Some(adjust_kind(req, Structure::ColorModel.completion_kind())),
data: Some(CompletionItemData::ColorModel.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -259,7 +259,7 @@ pub fn package(
label: name,
kind: Some(adjust_kind(req, Structure::Package.completion_kind())),
data: Some(CompletionItemData::Package.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -273,7 +273,7 @@ pub fn class(
label: name,
kind: Some(adjust_kind(req, Structure::Class.completion_kind())),
data: Some(CompletionItemData::Class.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand Down Expand Up @@ -318,7 +318,7 @@ pub fn citation(
kind: Some(adjust_kind(req, kind)),
filter_text: Some(filter_text),
data: Some(CompletionItemData::Citation { uri, key }.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand All @@ -333,7 +333,7 @@ pub fn entry_type(
label: (&ty.name).into(),
kind: Some(adjust_kind(req, kind)),
data: Some(CompletionItemData::EntryType.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
documentation: ty.documentation.as_ref().map(|doc| {
Documentation::MarkupContent(MarkupContent {
kind: MarkupKind::Markdown,
Expand All @@ -353,7 +353,7 @@ pub fn field_name(
label: (&field.name).into(),
kind: Some(adjust_kind(req, Structure::Field.completion_kind())),
data: Some(CompletionItemData::FieldName.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
documentation: Some(Documentation::MarkupContent(MarkupContent {
kind: MarkupKind::Markdown,
value: (&field.documentation).into(),
Expand All @@ -372,7 +372,7 @@ pub fn argument(
label: name.into(),
kind: Some(adjust_kind(req, Structure::Argument.completion_kind())),
data: Some(CompletionItemData::Argument.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
documentation: image.and_then(|image| image_documentation(&req, &name, image)),
..CompletionItem::default()
}
Expand All @@ -387,7 +387,7 @@ pub fn glossary_entry(
label,
kind: Some(adjust_kind(req, Structure::GlossaryEntry.completion_kind())),
data: Some(CompletionItemData::GlossaryEntry.into()),
text_edit: Some(text_edit),
text_edit: Some(CompletionTextEdit::Edit(text_edit)),
..CompletionItem::default()
}
}
Expand Down
4 changes: 3 additions & 1 deletion crates/texlab_completion/src/latex/argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod tests {
use super::*;
use indoc::indoc;
use texlab_feature::FeatureTester;
use texlab_protocol::{Range, RangeExt};
use texlab_protocol::{CompletionTextEditExt, Range, RangeExt};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -102,6 +102,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 8, 1, 8)
Expand Down Expand Up @@ -130,6 +131,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 8, 1, 11)
Expand Down
6 changes: 5 additions & 1 deletion crates/texlab_completion/src/latex/citation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ mod tests {
use super::*;
use indoc::indoc;
use texlab_feature::FeatureTester;
use texlab_protocol::{Range, RangeExt};
use texlab_protocol::{CompletionTextEditExt, Range, RangeExt};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -114,6 +114,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 6, 1, 6)
Expand Down Expand Up @@ -145,6 +146,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 6, 1, 6)
Expand Down Expand Up @@ -176,6 +178,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 6, 1, 9)
Expand Down Expand Up @@ -207,6 +210,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(1, 10, 1, 10)
Expand Down
3 changes: 2 additions & 1 deletion crates/texlab_completion/src/latex/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl FeatureProvider for LatexColorCompletionProvider {
mod tests {
use super::*;
use texlab_feature::FeatureTester;
use texlab_protocol::{Range, RangeExt};
use texlab_protocol::{CompletionTextEditExt, Range, RangeExt};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -76,6 +76,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 7, 0, 7)
Expand Down
4 changes: 3 additions & 1 deletion crates/texlab_completion/src/latex/color_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl FeatureProvider for LatexColorModelCompletionProvider {
mod tests {
use super::*;
use texlab_feature::FeatureTester;
use texlab_protocol::{Range, RangeExt};
use texlab_protocol::{CompletionTextEditExt, Range, RangeExt};

#[tokio::test]
async fn empty_latex_document() {
Expand Down Expand Up @@ -81,6 +81,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 19, 0, 19)
Expand All @@ -101,6 +102,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 16, 0, 16)
Expand Down
6 changes: 5 additions & 1 deletion crates/texlab_completion/src/latex/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ mod tests {
use super::*;
use indoc::indoc;
use texlab_feature::FeatureTester;
use texlab_protocol::{Range, RangeExt};
use texlab_protocol::{CompletionTextEditExt, Range, RangeExt};

#[tokio::test]
async fn empty_latex_document_command() {
Expand Down Expand Up @@ -173,6 +173,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 1, 0, 4)
Expand Down Expand Up @@ -265,6 +266,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 7, 0, 7)
Expand All @@ -285,6 +287,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 5, 0, 8)
Expand Down Expand Up @@ -353,6 +356,7 @@ mod tests {
actual_items[0]
.text_edit
.as_ref()
.and_then(|edit| edit.text_edit())
.map(|edit| edit.range)
.unwrap(),
Range::new_simple(0, 7, 0, 10)
Expand Down
Loading

0 comments on commit 7a88e59

Please sign in to comment.