diff --git a/Cargo.lock b/Cargo.lock index 714875ae..593b59f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,6 +128,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +[[package]] +name = "bibfmt" +version = "0.0.0" +dependencies = [ + "expect-test", + "line-index", + "parser", + "rowan", + "syntax", +] + [[package]] name = "bibtex-utils" version = "0.0.0" @@ -1667,6 +1678,7 @@ dependencies = [ "anyhow", "assert_unordered", "base-db", + "bibfmt", "citeproc", "clap", "commands", diff --git a/crates/bibfmt/Cargo.toml b/crates/bibfmt/Cargo.toml new file mode 100644 index 00000000..fb05657d --- /dev/null +++ b/crates/bibfmt/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "bibfmt" +version = "0.0.0" +license.workspace = true +authors.workspace = true +edition.workspace = true +rust-version.workspace = true + +[dependencies] +rowan = "0.15.11" +syntax = { path = "../syntax" } +line-index = "0.1.0" + +[lib] +doctest = false + +[dev-dependencies] +expect-test = "1.4.1" +parser = { path = "../parser" } diff --git a/crates/bibfmt/src/lib.rs b/crates/bibfmt/src/lib.rs new file mode 100644 index 00000000..cfce131f --- /dev/null +++ b/crates/bibfmt/src/lib.rs @@ -0,0 +1,193 @@ +use line_index::LineIndex; +use rowan::{ast::AstNode, NodeOrToken}; +use syntax::bibtex::{self, HasName, HasType, HasValue}; + +pub struct Options { + pub insert_spaces: bool, + pub tab_size: usize, + pub line_length: usize, +} + +impl Options { + fn indent(&self) -> String { + if self.insert_spaces { + std::iter::repeat(' ').take(self.tab_size).collect() + } else { + String::from("\t") + } + } +} + +impl Default for Options { + fn default() -> Self { + Self { + insert_spaces: true, + tab_size: 4, + line_length: 80, + } + } +} + +pub fn format(root: &bibtex::SyntaxNode, line_index: &LineIndex, options: &Options) -> String { + let indent = options.indent(); + let mut output = String::new(); + for elem in root.children_with_tokens() { + match elem { + NodeOrToken::Token(token) => { + output.push_str(token.text()); + } + NodeOrToken::Node(node) => { + let mut fmt = Formatter { + indent: &indent, + output: &mut output, + options, + align: Vec::new(), + line_index, + }; + + fmt.visit_node(node); + } + } + } + + output +} + +struct Formatter<'a> { + output: &'a mut String, + indent: &'a str, + options: &'a Options, + align: Vec, + line_index: &'a LineIndex, +} + +impl<'a> Formatter<'a> { + fn visit_token_lowercase(&mut self, token: &bibtex::SyntaxToken) { + self.output.push_str(&token.text().to_lowercase()); + } + + fn should_insert_space( + &self, + previous: &bibtex::SyntaxToken, + current: &bibtex::SyntaxToken, + ) -> bool { + let previous = self.line_index.line_col(previous.text_range().end()); + let current = self.line_index.line_col(current.text_range().start()); + previous.line != current.line || previous.col < current.col + } + + fn base_align(&self) -> usize { + self.output[self.output.rfind('\n').unwrap_or(0)..] + .chars() + .count() + } + + fn visit_node(&mut self, parent: bibtex::SyntaxNode) { + match parent.kind() { + bibtex::PREAMBLE => { + let preamble = bibtex::Preamble::cast(parent).unwrap(); + self.visit_token_lowercase(&preamble.type_token().unwrap()); + self.output.push('{'); + if preamble.syntax().children().next().is_some() { + self.align.push(self.base_align()); + for node in preamble.syntax().children() { + self.visit_node(node); + } + self.output.push('}'); + } + } + bibtex::STRING => { + let string = bibtex::StringDef::cast(parent).unwrap(); + self.visit_token_lowercase(&string.type_token().unwrap()); + self.output.push('{'); + if let Some(name) = string.name_token() { + self.output.push_str(name.text()); + self.output.push_str(" = "); + if let Some(value) = string.value() { + self.align.push(self.base_align()); + self.visit_node(value.syntax().clone()); + self.output.push('}'); + } + } + } + bibtex::ENTRY => { + let entry = bibtex::Entry::cast(parent).unwrap(); + self.visit_token_lowercase(&entry.type_token().unwrap()); + self.output.push('{'); + if let Some(key) = entry.name_token() { + self.output.push_str(&key.to_string()); + self.output.push(','); + self.output.push('\n'); + for field in entry.fields() { + self.visit_node(field.syntax().clone()); + } + self.output.push('}'); + } + } + bibtex::FIELD => { + let field = bibtex::Field::cast(parent).unwrap(); + self.output.push_str(&self.indent); + let name = field.name_token().unwrap(); + self.output.push_str(name.text()); + self.output.push_str(" = "); + if let Some(value) = field.value() { + let count = name.text().chars().count(); + self.align.push(self.options.tab_size + count + 3); + self.visit_node(value.syntax().clone()); + self.output.push(','); + self.output.push('\n'); + } + } + kind if bibtex::Value::can_cast(kind) => { + let tokens: Vec<_> = parent + .descendants_with_tokens() + .filter_map(|element| element.into_token()) + .filter(|token| token.kind() != bibtex::WHITESPACE) + .collect(); + + self.output.push_str(tokens[0].text()); + + let align = self.align.pop().unwrap_or_default(); + let mut length = align + tokens[0].text().chars().count(); + for i in 1..tokens.len() { + let previous = &tokens[i - 1]; + let current = &tokens[i]; + let current_length = current.text().chars().count(); + + let insert_space = self.should_insert_space(previous, current); + let space_length = if insert_space { 1 } else { 0 }; + + if length + current_length + space_length > self.options.line_length { + self.output.push('\n'); + self.output.push_str(self.indent.as_ref()); + for _ in 0..=align - self.options.tab_size as usize { + self.output.push(' '); + } + length = align; + } else if insert_space { + self.output.push(' '); + length += 1; + } + self.output.push_str(current.text()); + length += current_length; + } + } + bibtex::ROOT | bibtex::JUNK => { + for element in parent.children_with_tokens() { + match element { + NodeOrToken::Token(token) => { + self.output.push_str(token.text()); + } + NodeOrToken::Node(node) => { + self.visit_node(node); + } + } + } + } + _ => unreachable!(), + } + } +} + +#[cfg(test)] +mod tests; diff --git a/crates/bibfmt/src/tests.rs b/crates/bibfmt/src/tests.rs new file mode 100644 index 00000000..c081a15e --- /dev/null +++ b/crates/bibfmt/src/tests.rs @@ -0,0 +1,144 @@ +use expect_test::{expect, Expect}; +use line_index::LineIndex; +use syntax::bibtex; + +use crate::Options; + +fn check(input: &str, expect: Expect) { + let green = parser::parse_bibtex(input); + let root = bibtex::SyntaxNode::new_root(green); + let line_index = LineIndex::new(input); + let output = crate::format(&root, &line_index, &Options::default()); + expect.assert_eq(&output); +} + +#[test] +fn test_wrap_long_lines() { + check( + r#"@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Lorem ipsum dolor sit amet, + consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}"#, + expect![[r#" + @article{foo, + bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum + dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit + amet, consectetur adipiscing elit.}, + }"#]], + ); +} + +#[test] +fn test_multiple_entries() { + check( + r#"@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},} + +@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Lorem ipsum dolor sit amet, +consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}"#, + expect![[r#" + @article{foo, + bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum + dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit + amet, consectetur adipiscing elit.}, + } + + @article{foo, + bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum + dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit + amet, consectetur adipiscing elit.}, + }"#]], + ); +} + +#[test] +fn test_trailing_comma() { + check( + r#"@article{foo, bar = baz}"#, + expect![[r#" + @article{foo, + bar = baz, + }"#]], + ); +} + +#[test] +fn test_insert_braces() { + check( + r#"@article{foo, bar = baz,"#, + expect![[r#" + @article{foo, + bar = baz, + }"#]], + ); +} + +#[test] +fn test_comment() { + check( + r#"Foo Bar +@article{foo, bar = "\baz",} +Baz +@article{f,} +Qux"#, + expect![[r#" + Foo Bar + @article{foo, + bar = "\baz", + } + Baz + @article{f, + } + Qux"#]], + ); +} + +#[test] +fn test_command() { + check( + r#"@article{foo, bar = "\baz",}"#, + expect![[r#" + @article{foo, + bar = "\baz", + }"#]], + ); +} + +#[test] +fn test_join_strings() { + check( + r#"@article{foo, bar = "baz" # "qux"}"#, + expect![[r#" + @article{foo, + bar = "baz" # "qux", + }"#]], + ); +} + +#[test] +fn test_parens() { + check( + r#"@article(foo,)"#, + expect![[r#" + @article{foo, + }"#]], + ); +} + +#[test] +fn test_string() { + check( + r#"@string{foo="bar"}"#, + expect![[r#"@string{foo = "bar"}"#]], + ); +} + +#[test] +fn test_preamble() { + check( + r#"@preamble{ + "foo bar baz" }"#, + expect![[r#"@preamble{"foo bar baz"}"#]], + ); +} diff --git a/crates/texlab/Cargo.toml b/crates/texlab/Cargo.toml index 4693dec2..3e51f8f4 100644 --- a/crates/texlab/Cargo.toml +++ b/crates/texlab/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/latex-lsp/texlab" documentation = "https://github.com/latex-lsp/texlab" keywords = ["lsp", "server", "latex", "bibtex"] categories = ["development-tools"] -exclude = ["tests/it/**", "*.snap"] +exclude = ["*.snap"] [[bin]] name = "texlab" @@ -24,6 +24,7 @@ doctest = false [dependencies] anyhow = "1.0.75" base-db = { path = "../base-db" } +bibfmt = { path = "../bibfmt" } citeproc = { path = "../citeproc" } clap = { version = "4.4.4", features = ["derive"] } commands = { path = "../commands" } diff --git a/crates/texlab/src/features/formatting/bibtex_internal.rs b/crates/texlab/src/features/formatting/bibtex_internal.rs index a48f2abb..0070765b 100644 --- a/crates/texlab/src/features/formatting/bibtex_internal.rs +++ b/crates/texlab/src/features/formatting/bibtex_internal.rs @@ -1,8 +1,6 @@ use base_db::{Document, Workspace}; -use line_index::LineIndex; use lsp_types::{FormattingOptions, TextEdit}; -use rowan::{ast::AstNode, NodeOrToken}; -use syntax::bibtex::{self, HasName, HasType, HasValue}; +use rowan::{TextLen, TextRange}; use crate::util::line_index_ext::LineIndexExt; @@ -11,197 +9,15 @@ pub fn format_bibtex_internal( document: &Document, options: &FormattingOptions, ) -> Option> { - let mut indent = String::new(); - - if options.insert_spaces { - for _ in 0..options.tab_size { - indent.push(' '); - } - } else { - indent.push('\t'); - } - - let line_length = workspace.config().formatting.line_length; - - let line_index = &document.line_index; - let data = document.data.as_bib()?; - let mut edits = Vec::new(); - - for node in data.root_node().children().filter(|node| { - matches!( - node.kind(), - bibtex::PREAMBLE | bibtex::STRING | bibtex::ENTRY - ) - }) { - let range = node.text_range(); - - let mut formatter = - Formatter::new(indent.clone(), options.tab_size, line_length, line_index); - - formatter.visit_node(node); - edits.push(TextEdit { - range: line_index.line_col_lsp_range(range)?, - new_text: formatter.output, - }); - } - - Some(edits) -} - -struct Formatter<'a> { - indent: String, - tab_size: u32, - line_length: usize, - output: String, - align: Vec, - line_index: &'a LineIndex, -} - -impl<'a> Formatter<'a> { - fn new(indent: String, tab_size: u32, line_length: usize, line_index: &'a LineIndex) -> Self { - Self { - indent, - tab_size, - line_length, - output: String::new(), - align: Vec::new(), - line_index, - } - } - - fn visit_token_lowercase(&mut self, token: &bibtex::SyntaxToken) { - self.output.push_str(&token.text().to_lowercase()); - } - - fn should_insert_space( - &self, - previous: &bibtex::SyntaxToken, - current: &bibtex::SyntaxToken, - ) -> bool { - let previous_range = self - .line_index - .line_col_lsp_range(previous.text_range()) - .unwrap(); - - let current_range = self - .line_index - .line_col_lsp_range(current.text_range()) - .unwrap(); - - previous_range.start.line != current_range.start.line - || previous_range.end.character < current_range.start.character - } - - fn base_align(&self) -> usize { - self.output[self.output.rfind('\n').unwrap_or(0)..] - .chars() - .count() - } - - fn visit_node(&mut self, parent: bibtex::SyntaxNode) { - match parent.kind() { - bibtex::PREAMBLE => { - let preamble = bibtex::Preamble::cast(parent).unwrap(); - self.visit_token_lowercase(&preamble.type_token().unwrap()); - self.output.push('{'); - if preamble.syntax().children().next().is_some() { - self.align.push(self.base_align()); - for node in preamble.syntax().children() { - self.visit_node(node); - } - self.output.push('}'); - } - } - bibtex::STRING => { - let string = bibtex::StringDef::cast(parent).unwrap(); - self.visit_token_lowercase(&string.type_token().unwrap()); - self.output.push('{'); - if let Some(name) = string.name_token() { - self.output.push_str(name.text()); - self.output.push_str(" = "); - if let Some(value) = string.value() { - self.align.push(self.base_align()); - self.visit_node(value.syntax().clone()); - self.output.push('}'); - } - } - } - bibtex::ENTRY => { - let entry = bibtex::Entry::cast(parent).unwrap(); - self.visit_token_lowercase(&entry.type_token().unwrap()); - self.output.push('{'); - if let Some(key) = entry.name_token() { - self.output.push_str(&key.to_string()); - self.output.push(','); - self.output.push('\n'); - for field in entry.fields() { - self.visit_node(field.syntax().clone()); - } - self.output.push('}'); - } - } - bibtex::FIELD => { - let field = bibtex::Field::cast(parent).unwrap(); - self.output.push_str(&self.indent); - let name = field.name_token().unwrap(); - self.output.push_str(name.text()); - self.output.push_str(" = "); - if let Some(value) = field.value() { - let count = name.text().chars().count(); - self.align.push(self.tab_size as usize + count + 3); - self.visit_node(value.syntax().clone()); - self.output.push(','); - self.output.push('\n'); - } - } - kind if bibtex::Value::can_cast(kind) => { - let tokens: Vec<_> = parent - .descendants_with_tokens() - .filter_map(|element| element.into_token()) - .filter(|token| token.kind() != bibtex::WHITESPACE) - .collect(); - - self.output.push_str(tokens[0].text()); - - let align = self.align.pop().unwrap_or_default(); - let mut length = align + tokens[0].text().chars().count(); - for i in 1..tokens.len() { - let previous = &tokens[i - 1]; - let current = &tokens[i]; - let current_length = current.text().chars().count(); - - let insert_space = self.should_insert_space(previous, current); - let space_length = if insert_space { 1 } else { 0 }; - - if length + current_length + space_length > self.line_length { - self.output.push('\n'); - self.output.push_str(self.indent.as_ref()); - for _ in 0..=align - self.tab_size as usize { - self.output.push(' '); - } - length = align; - } else if insert_space { - self.output.push(' '); - length += 1; - } - self.output.push_str(current.text()); - length += current_length; - } - } - bibtex::ROOT | bibtex::JUNK => { - for element in parent.children_with_tokens() { - match element { - NodeOrToken::Token(token) => { - self.output.push_str(token.text()); - } - NodeOrToken::Node(node) => { - self.visit_node(node); - } - } - } - } - _ => unreachable!(), - } - } + let options = bibfmt::Options { + insert_spaces: options.insert_spaces, + line_length: workspace.config().formatting.line_length, + tab_size: options.tab_size as usize, + }; + + let output = bibfmt::format(&data.root_node(), &document.line_index, &options); + let range = TextRange::new(0.into(), document.text.text_len()); + let range = document.line_index.line_col_lsp_range(range)?; + Some(vec![lsp_types::TextEdit::new(range, output)]) } diff --git a/crates/texlab/tests/lsp/fixture.rs b/crates/texlab/tests/lsp/fixture.rs index a10105eb..020c5caa 100644 --- a/crates/texlab/tests/lsp/fixture.rs +++ b/crates/texlab/tests/lsp/fixture.rs @@ -252,10 +252,6 @@ impl TestBed { &self.temp_dir_path } - pub fn documents(&self) -> &[Document] { - &self.fixture.documents - } - pub fn redact(&self, uri: &Url) -> Url { if uri.scheme() != "file" { return uri.clone(); diff --git a/crates/texlab/tests/lsp/text_document.rs b/crates/texlab/tests/lsp/text_document.rs index 8276c438..43faeae5 100644 --- a/crates/texlab/tests/lsp/text_document.rs +++ b/crates/texlab/tests/lsp/text_document.rs @@ -1,5 +1,4 @@ mod document_highlight; mod document_link; mod document_symbol; -mod formatting; mod inlay_hint; diff --git a/crates/texlab/tests/lsp/text_document/formatting.rs b/crates/texlab/tests/lsp/text_document/formatting.rs deleted file mode 100644 index a1e02564..00000000 --- a/crates/texlab/tests/lsp/text_document/formatting.rs +++ /dev/null @@ -1,135 +0,0 @@ -use insta::assert_snapshot; -use line_index::LineIndex; -use lsp_types::{ - request::Formatting, ClientCapabilities, DocumentFormattingParams, FormattingOptions, -}; -use texlab::util::line_index_ext::LineIndexExt; - -use crate::fixture::TestBed; - -fn format(fixture: &str) -> String { - let test_bed = TestBed::new(fixture).unwrap(); - test_bed.initialize(ClientCapabilities::default()).unwrap(); - - let text_document = test_bed.cursor().unwrap().text_document; - let edits = test_bed - .client() - .send_request::(DocumentFormattingParams { - text_document, - work_done_progress_params: Default::default(), - options: FormattingOptions { - insert_spaces: true, - tab_size: 4, - ..Default::default() - }, - }) - .unwrap() - .unwrap_or_default(); - - let old_text = &test_bed.documents()[0].text; - let line_index = LineIndex::new(old_text); - let mut new_text = String::from(old_text); - for edit in edits.into_iter().rev() { - let range = line_index.offset_lsp_range(edit.range).unwrap(); - new_text.replace_range::>(range.into(), &edit.new_text); - } - - new_text -} - -#[test] -fn bibtex_internal_wrap_long_lines() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},} -|"#, - )); -} - -#[test] -fn bibtex_internal_multiple_entries() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},} - -@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}" -|"#, - )); -} - -#[test] -fn bibtex_internal_trailing_comma() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = baz} -|"#, - )); -} - -#[test] -fn bibtex_internal_insert_braces() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = baz, -|"#, - )); -} - -#[test] -fn bibtex_internal_command() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = "\baz",} -|"#, - )); -} - -#[test] -fn bibtex_internal_join_strings() { - assert_snapshot!(format( - r#" -%! main.bib -@article{foo, bar = "baz" # "qux"} -|"#, - )); -} - -#[test] -fn bibtex_internal_parens() { - assert_snapshot!(format( - r#" -%! main.bib -@article(foo,) -|"#, - )); -} - -#[test] -fn bibtex_internal_string() { - assert_snapshot!(format( - r#" -%! main.bib -@string{foo="bar"} -|"#, - )); -} - -#[test] -fn bibtex_internal_preamble() { - assert_snapshot!(format( - r#" -%! main.bib -@preamble{ - "foo bar baz" } -|"#, - )); -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_package_ref.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_package_ref.snap deleted file mode 100644 index 19c84e95..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_package_ref.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\acrodef{fpsLabel}[FPS]{Frames per Second}\n\\ac{f\n |\n ^\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_empty.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_empty.snap deleted file mode 100644 index 23e5b695..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_empty.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n\\acrshort{}\n |\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_open_brace.snap deleted file mode 100644 index 25171b67..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_open_brace.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n\\acrshort{f\n |\n ^\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_simple.snap deleted file mode 100644 index 1d3f3329..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_ref_simple.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n\\acrshort{f}\n |\n ^\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_empty.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_empty.snap deleted file mode 100644 index ecc48b5a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_empty.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{amsfonts}\n\\mathbb{}\n |\"#)" ---- -[ - { - "label": "A", - "preselect": false - }, - { - "label": "B", - "preselect": false - }, - { - "label": "C", - "preselect": false - }, - { - "label": "D", - "preselect": false - }, - { - "label": "E", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_open_brace.snap deleted file mode 100644 index 530527a3..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{amsfonts}\n\\mathbb{\n |\nTest\"#)" ---- -[ - { - "label": "A", - "preselect": false - }, - { - "label": "B", - "preselect": false - }, - { - "label": "C", - "preselect": false - }, - { - "label": "D", - "preselect": false - }, - { - "label": "E", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_word.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_word.snap deleted file mode 100644 index c98249c7..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__argument_word.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{amsfonts}\n\\mathbb{A}\n |\n ^\"#)" ---- -[ - { - "label": "A", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__begin_environment_without_snippet_support.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__begin_environment_without_snippet_support.snap deleted file mode 100644 index bb9e30ae..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__begin_environment_without_snippet_support.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\beg\n |\n ^^^\"#)" ---- -[ - { - "label": "AtBeginDocument", - "detail": "built-in", - "preselect": false - }, - { - "label": "AtBeginDvi", - "detail": "built-in", - "preselect": false - }, - { - "label": "begin", - "detail": "built-in", - "preselect": false - }, - { - "label": "begingroup", - "detail": "built-in", - "preselect": false - }, - { - "label": "bigwedge", - "detail": "⋀, built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation.snap deleted file mode 100644 index db26e612..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{article}\n\\bibliography{main}\n\\begin{document}\n\\cite{\n |\n\\end{document}\n\n%! main.bib\n@article{foo:2019,\n author = {Foo Bar},\n title = {Baz Qux},\n year = {2019},\n}\n\n@article{bar:2005,}\"#)" ---- -[ - { - "label": "bar:2005", - "preselect": false, - "filterText": "bar:2005 @article" - }, - { - "label": "foo:2019", - "preselect": false, - "filterText": "foo:2019 @article Foo Bar Baz Qux 2019" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_acronym.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_acronym.snap deleted file mode 100644 index 242d5d2a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_acronym.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\addbibresource{main.bib}\n\\DeclareAcronym{foo}{cite={}}\n |\n\n%! main.bib\n@article{foo,}\"#)" ---- -[ - { - "label": "foo", - "preselect": false, - "filterText": "foo @article" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace.snap deleted file mode 100644 index b205903a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\addbibresource{main.bib}\n\\cite{\n |\n\n%! main.bib\n@article{foo,}\"#)" ---- -[ - { - "label": "foo", - "preselect": false, - "filterText": "foo @article" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace_multiple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace_multiple.snap deleted file mode 100644 index 519fa60f..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__citation_open_brace_multiple.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\addbibresource{main.bib}\n\\cite{foo,a\n |\n ^\n\n%! main.bib\n@article{foo,}\"#)" ---- -[ - { - "label": "foo", - "preselect": false, - "filterText": "foo @article" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_open_brace.snap deleted file mode 100644 index 421335a4..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\definecolor{foo}{\n |\"#)" ---- -[ - { - "label": "HTML", - "preselect": false - }, - { - "label": "RGB", - "preselect": false - }, - { - "label": "cmyk", - "preselect": false - }, - { - "label": "gray", - "preselect": false - }, - { - "label": "rgb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_open_brace.snap deleted file mode 100644 index 5d7338e4..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\definecolorset{\n |\"#)" ---- -[ - { - "label": "HTML", - "preselect": false - }, - { - "label": "RGB", - "preselect": false - }, - { - "label": "cmyk", - "preselect": false - }, - { - "label": "gray", - "preselect": false - }, - { - "label": "rgb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_simple.snap deleted file mode 100644 index 811b47c9..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_set_simple.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\definecolorset{}\n |\"#)" ---- -[ - { - "label": "HTML", - "preselect": false - }, - { - "label": "RGB", - "preselect": false - }, - { - "label": "cmyk", - "preselect": false - }, - { - "label": "gray", - "preselect": false - }, - { - "label": "rgb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_simple.snap deleted file mode 100644 index dbb34f08..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_model_definition_simple.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\definecolor{foo}{}\n |\"#)" ---- -[ - { - "label": "HTML", - "preselect": false - }, - { - "label": "RGB", - "preselect": false - }, - { - "label": "cmyk", - "preselect": false - }, - { - "label": "gray", - "preselect": false - }, - { - "label": "rgb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_open_brace.snap deleted file mode 100644 index e30fc4c1..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\color{\n |\"#)" ---- -[ - { - "label": "Apricot", - "preselect": false - }, - { - "label": "Aquamarine", - "preselect": false - }, - { - "label": "Bittersweet", - "preselect": false - }, - { - "label": "Black", - "preselect": false - }, - { - "label": "Blue", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_simple.snap deleted file mode 100644 index 5aab0d8e..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_simple.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\color{}\n |\"#)" ---- -[ - { - "label": "Apricot", - "preselect": false - }, - { - "label": "Aquamarine", - "preselect": false - }, - { - "label": "Bittersweet", - "preselect": false - }, - { - "label": "Black", - "preselect": false - }, - { - "label": "Blue", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_word.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_word.snap deleted file mode 100644 index fe803dc6..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__color_word.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\color{re}\n |\n ^^\"#)" ---- -[ - { - "label": "BrickRed", - "preselect": false - }, - { - "label": "Red", - "preselect": false - }, - { - "label": "RedOrange", - "preselect": false - }, - { - "label": "RedViolet", - "preselect": false - }, - { - "label": "red", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_bibtex.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_bibtex.snap deleted file mode 100644 index 616fb22a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_bibtex.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{b,\n c = {\\LaT }\n |\n ^^^\n}\"#)" ---- -[ - { - "label": "LaTeX", - "detail": "built-in", - "preselect": false - }, - { - "label": "LaTeXe", - "detail": "built-in", - "preselect": false - }, - { - "label": "LastDeclaredEncoding", - "detail": "built-in", - "preselect": false - }, - { - "label": "last", - "detail": "built-in", - "preselect": false - }, - { - "label": "latexreleaseversion", - "detail": "built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple.snap deleted file mode 100644 index 0e40056a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\\n |\"#)" ---- -[ - { - "label": "!", - "detail": "built-in", - "preselect": false - }, - { - "label": "\"", - "detail": "built-in", - "preselect": false - }, - { - "label": "#", - "detail": "built-in", - "preselect": false - }, - { - "label": "$", - "detail": "$, built-in", - "preselect": false - }, - { - "label": "%", - "detail": "built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple_package.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple_package.snap deleted file mode 100644 index 360229fa..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_command_simple_package.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{lipsum}\n\\lips\n |\n ^^^^\"#)" ---- -[ - { - "label": "LipsumPar", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumProtect", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumRestoreAll", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsum", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsumexp", - "detail": "lipsum.sty", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_class.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_class.snap deleted file mode 100644 index a2e5e17a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_class.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{article}\n\\begin{thein}\n |\n ^^^^^\"#)" ---- -[ - { - "label": "theindex", - "detail": "article.cls", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_command_definition.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_command_definition.snap deleted file mode 100644 index 28d9c6e8..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_command_definition.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newcommand{\\foo}{\\begin{doc}\n |\n ^^^\"#)" ---- -[ - { - "label": "document", - "detail": "built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple.snap deleted file mode 100644 index f892dba5..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\begin{doc\n |\n ^^^\"#)" ---- -[ - { - "label": "document", - "detail": "built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple_end.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple_end.snap deleted file mode 100644 index 95a2e1db..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple_end.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\begin{document}\n\\end{\n |\"#)" ---- -[ - { - "label": "abstract", - "detail": "built-in", - "preselect": false - }, - { - "label": "array", - "detail": "built-in", - "preselect": false - }, - { - "label": "center", - "detail": "built-in", - "preselect": false - }, - { - "label": "csname", - "detail": "built-in", - "preselect": false - }, - { - "label": "document", - "detail": "built-in", - "preselect": true - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_preamble.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_preamble.snap deleted file mode 100644 index 0fd8b002..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_preamble.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@preamble{\n |\n ^^^^^^^^\"#)" ---- -[ - { - "label": "preamble", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_string.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_string.snap deleted file mode 100644 index 6844fc18..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_after_string.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@string{\n |\n ^^^^^^\"#)" ---- -[ - { - "label": "string", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_at_empty.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_at_empty.snap deleted file mode 100644 index e74f5fed..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_at_empty.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@\n |\"#)" ---- -[ - { - "label": "article", - "preselect": false - }, - { - "label": "artwork", - "preselect": false - }, - { - "label": "audio", - "preselect": false - }, - { - "label": "bibnote", - "preselect": false - }, - { - "label": "book", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_article.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_article.snap deleted file mode 100644 index f9defdee..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_article.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article\n |\n ^^^^^^^\"#)" ---- -[ - { - "label": "article", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_preamble.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_preamble.snap deleted file mode 100644 index aad03a39..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_preamble.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@preamble\n |\n ^^^^^^^^\"#)" ---- -[ - { - "label": "preamble", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_string.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_string.snap deleted file mode 100644 index e30c60a4..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_before_string.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@string\n |\n ^^^^^^\"#)" ---- -[ - { - "label": "string", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_complete_entry.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_complete_entry.snap deleted file mode 100644 index 2724026a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__entry_type_complete_entry.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo, author = {foo}}\n |\n ^^^^^^^\"#)" ---- -[ - { - "label": "article", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_closed.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_closed.snap deleted file mode 100644 index a5a1d783..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_closed.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo,}\n |\"#)" ---- -[ - { - "label": "abstract", - "preselect": false - }, - { - "label": "addendum", - "preselect": false - }, - { - "label": "address", - "preselect": false - }, - { - "label": "afterword", - "preselect": false - }, - { - "label": "annotation", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_open.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_open.snap deleted file mode 100644 index 693d4ed1..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_empty_entry_open.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo,\n |\"#)" ---- -[ - { - "label": "abstract", - "preselect": false - }, - { - "label": "addendum", - "preselect": false - }, - { - "label": "address", - "preselect": false - }, - { - "label": "afterword", - "preselect": false - }, - { - "label": "annotation", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_field_name.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_field_name.snap deleted file mode 100644 index cb0d41ed..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_field_name.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo, a\n |\n ^\"#)" ---- -[ - { - "label": "abstract", - "preselect": false - }, - { - "label": "addendum", - "preselect": false - }, - { - "label": "address", - "preselect": false - }, - { - "label": "afterword", - "preselect": false - }, - { - "label": "annotation", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_closed.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_closed.snap deleted file mode 100644 index 66dbf627..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_closed.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo, author = bar, edit}\n |\n ^^^^\"#)" ---- -[ - { - "label": "edition", - "preselect": false - }, - { - "label": "editor", - "preselect": false - }, - { - "label": "editora", - "preselect": false - }, - { - "label": "editoratype", - "preselect": false - }, - { - "label": "editorb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_open.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_open.snap deleted file mode 100644 index 221f78f3..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__field_entry_two_fields_name_open.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.bib\n@article{foo, author = bar, edit\n |\n ^^^^\"#)" ---- -[ - { - "label": "edition", - "preselect": false - }, - { - "label": "editor", - "preselect": false - }, - { - "label": "editora", - "preselect": false - }, - { - "label": "editoratype", - "preselect": false - }, - { - "label": "editorb", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_open_brace.snap deleted file mode 100644 index 1be95d5d..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_open_brace.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n\\gls{f\n |\n ^\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_simple.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_simple.snap deleted file mode 100644 index 81e9299d..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__glossary_ref_simple.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n\\gls{f}\n |\n ^\"#)" ---- -[ - { - "label": "fpsLabel", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_closed_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_closed_brace.snap deleted file mode 100644 index 9ed79786..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_closed_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{art}\n |\n ^^^\"#)" ---- -[ - { - "label": "article", - "preselect": false - }, - { - "label": "articleingud", - "preselect": false - }, - { - "label": "articoletteracdp", - "preselect": false - }, - { - "label": "artikel1", - "preselect": false - }, - { - "label": "artikel2", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_open_brace.snap deleted file mode 100644 index b650b621..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_class_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{art \\foo\n |\n ^^^\"#)" ---- -[ - { - "label": "article", - "preselect": false - }, - { - "label": "articleingud", - "preselect": false - }, - { - "label": "articoletteracdp", - "preselect": false - }, - { - "label": "artikel1", - "preselect": false - }, - { - "label": "artikel2", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_closed_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_closed_brace.snap deleted file mode 100644 index f8cad552..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_closed_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{lips}\n |\n ^^^^\"#)" ---- -[ - { - "label": "lips", - "preselect": false - }, - { - "label": "lipsum", - "preselect": false - }, - { - "label": "lisp-simple-alloc", - "preselect": false - }, - { - "label": "lisp-string", - "preselect": false - }, - { - "label": "lwarp-lips", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_open_brace.snap deleted file mode 100644 index d234241e..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__import_package_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepackage{lips\n |\n ^^^^\"#)" ---- -[ - { - "label": "lips", - "preselect": false - }, - { - "label": "lipsum", - "preselect": false - }, - { - "label": "lisp-simple-alloc", - "preselect": false - }, - { - "label": "lisp-string", - "preselect": false - }, - { - "label": "lwarp-lips", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_857_1.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_857_1.snap deleted file mode 100644 index 2b8f89b4..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_857_1.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! bug.tex\n\\documentclass{article}\n\\newcommand{\\ö}{foo}\n\\newcommand{\\öö}{bar}\n\\newcommand{\\ööabc}{baz}\n\\begin{document}\n\\ö\n |\n ^\n\\end{document}\n\"#)" ---- -[ - { - "label": "ö", - "detail": "user-defined", - "preselect": false - }, - { - "label": "öö", - "detail": "user-defined", - "preselect": false - }, - { - "label": "ööabc", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_864.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_864.snap deleted file mode 100644 index c4951042..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_864.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! bug.tex\n\\documentclass{article}\n\\def\\あいうえお{}\n\\begin{document}\n\\あ\n |\n ^\n\\end{document}\"#)" ---- -[ - { - "label": "あいうえお", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_883.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_883.snap deleted file mode 100644 index 2f17e08b..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_883.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! bug.tex\n\\begin{doc\n |\n ^^^\n% Comment\"#)" ---- -[ - { - "label": "document", - "detail": "built-in", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_885.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_885.snap deleted file mode 100644 index 2f286288..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_885.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{book}\n\\usepackage{import}\n\\begin{document}\n\\subincludefrom{part 1}{main}\n\\include{part 2/main}\n\n\\ref{sec}\n |\n ^^^\n\\end{document}\n\n%! part 1/main.tex\n\\part{1}\n\\label{part 1}\n\\subimport{chapter 1}{main}\n\n%! part 1/chapter 1/main.tex\n\\chapter{1}\n\\label{chapter 1}\n\\subimport{./}{section 1}\n%\\subimport{}{section 1}\n\n%! part 1/chapter 1/section 1.tex\n\\section{1}\n\\label{section 1}\n\n%! part 2/main.tex\n\\part{2}\n\\label{part 2}\n\\input{part 2/chapter 2/main}\n\n%! part 2/chapter 2/main.tex\n\\chapter{2}\n\\label{chapter 2}\n\\input{part 2/chapter 2/section 2}\n\n%! part 2/chapter 2/section 2.tex\n\\section{2}\n\\label{section 2}\n\"#)" ---- -[ - { - "label": "section 1", - "detail": "Section (1)", - "preselect": false, - "filterText": "section 1 Section (1)" - }, - { - "label": "section 2", - "detail": "Section (2)", - "preselect": false, - "filterText": "section 2 Section (2)" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__label.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__label.snap deleted file mode 100644 index a186c569..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__label.snap +++ /dev/null @@ -1,36 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! foo.tex\n\\documentclass{article}\n\n\\usepackage{amsmath}\n\\usepackage{caption}\n\\usepackage{amsthm}\n\\newtheorem{lemma}{Lemma}\n\n\\begin{document}\n\n\\section{Foo}%\n\\label{sec:foo}\n\n\\begin{equation}%\n\\label{eq:foo}\n 1 + 1 = 2\n\\end{equation}\n\n\\begin{equation}%\n\\label{eq:bar}\n 1 + 1 = 2\n\\end{equation}\n\n\\begin{figure}%\n\\LaTeX{}\n\\caption{Baz}%\n\\label{fig:baz}\n\\end{figure}\n\n\\begin{lemma}%\n\\label{thm:foo}\n 1 + 1 = 2\n\\end{lemma}\n\n\\include{bar}\n\n\\end{document}\n\n%! bar.tex\n\\section{Bar}%\n\\label{sec:bar}\n\nLorem ipsum dolor sit amet.\n\\ref{}\n |\n\n%! foo.aux\n\\relax\n\\@writefile{lof}{\\contentsline {figure}{\\numberline {1}{\\ignorespaces Baz\\relax }}{1}\\protected@file@percent }\n\\providecommand*\\caption@xref[2]{\\@setref\\relax\\@undefined{#1}}\n\\newlabel{fig:baz}{{1}{1}}\n\\@writefile{toc}{\\contentsline {section}{\\numberline {1}Foo}{1}\\protected@file@percent }\n\\newlabel{sec:foo}{{1}{1}}\n\\newlabel{eq:foo}{{1}{1}}\n\\newlabel{eq:bar}{{2}{1}}\n\\newlabel{thm:foo}{{1}{1}}\n\\@input{bar.aux}\"#)" ---- -[ - { - "label": "eq:bar", - "detail": "Equation (2)", - "preselect": false, - "filterText": "eq:bar Equation (2)" - }, - { - "label": "eq:foo", - "detail": "Equation (1)", - "preselect": false, - "filterText": "eq:foo Equation (1)" - }, - { - "label": "fig:baz", - "detail": "Figure 1", - "preselect": false, - "filterText": "fig:baz Figure 1: Baz" - }, - { - "label": "sec:bar", - "detail": "Section (Bar)", - "preselect": false, - "filterText": "sec:bar Section (Bar)" - }, - { - "label": "sec:foo", - "detail": "Section 1 (Foo)", - "preselect": false, - "filterText": "sec:foo Section 1 (Foo)" - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_import.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_import.snap deleted file mode 100644 index 351dc96d..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_import.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\documentclass{article}\n\\import{sub}{sub/sub.tex}\n\\lipsu\n |\n ^^^^^\n\n%! sub/sub.tex\n\\input{child.tex}\n\n%! sub/child.tex\n\\usepackage{lipsum}\"#)" ---- -[ - { - "label": "LipsumPar", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumProtect", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumRestoreAll", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsum", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsumexp", - "detail": "lipsum.sty", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_texlabroot.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_texlabroot.snap deleted file mode 100644 index 8ddefbc6..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__project_resolution_texlabroot.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! src/main.tex\n\\documentclass{article}\n\\include{src/foo}\n\\lipsu\n |\n ^^^^^\n\n%! src/foo.tex\n\\include{src/bar}\n\n%! src/bar.tex\n\\usepackage{lipsum}\n\n%! .texlabroot\"#)" ---- -[ - { - "label": "LipsumPar", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumProtect", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "LipsumRestoreAll", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsum", - "detail": "lipsum.sty", - "preselect": false - }, - { - "label": "lipsumexp", - "detail": "lipsum.sty", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_begin.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_begin.snap deleted file mode 100644 index f6072566..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_begin.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newtheorem{lemma}{Lemma}\n\\begin{lem\n |\n ^^^\"#)" ---- -[ - { - "label": "lemma", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_end.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_end.snap deleted file mode 100644 index 0ec951db..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__theorem_end.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\newtheorem{lemma}{Lemma}\n\\begin{}\n\\end{lem\n |\n ^^^\"#)" ---- -[ - { - "label": "lemma", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_closed_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_closed_brace.snap deleted file mode 100644 index e727fbbc..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_closed_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepgflibrary{}\n |\"#)" ---- -[ - { - "label": "arrows", - "preselect": false - }, - { - "label": "arrows.meta", - "preselect": false - }, - { - "label": "arrows.spaced", - "preselect": false - }, - { - "label": "curvilinear", - "preselect": false - }, - { - "label": "datavisualization.barcharts", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_open_brace.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_open_brace.snap deleted file mode 100644 index 668b445c..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__tikz_library_open_brace.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\usepgflibrary{\n |\"#)" ---- -[ - { - "label": "arrows", - "preselect": false - }, - { - "label": "arrows.meta", - "preselect": false - }, - { - "label": "arrows.spaced", - "preselect": false - }, - { - "label": "curvilinear", - "preselect": false - }, - { - "label": "datavisualization.barcharts", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_command.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_command.snap deleted file mode 100644 index ce8c10d8..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_command.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: crates/texlab/tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\foobar\n\\fooba\n |\n ^^^^^\n\\begin{foo}\n\\end{foo}\n\\begin{fo}\"#)" ---- -[ - { - "label": "foobar", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_environment.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_environment.snap deleted file mode 100644 index c46a9beb..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__user_environment.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/lsp/text_document/completion.rs -expression: "complete(r#\"\n%! main.tex\n\\foobar\n\\fooba\n\\begin{foo}\n\\end{foo}\n\\begin{fo}\n |\n ^^\"#)" ---- -[ - { - "label": "filecontents", - "detail": "built-in", - "preselect": false - }, - { - "label": "foo", - "detail": "user-defined", - "preselect": false - } -] diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_command.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_command.snap deleted file mode 100644 index b98dd687..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_command.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = \"\\baz\",}\n|\"#)" ---- -@article{foo, - bar = "\baz", -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_insert_braces.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_insert_braces.snap deleted file mode 100644 index a95f5d30..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_insert_braces.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = baz,\n|\"#)" ---- -@article{foo, - bar = baz, -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_join_strings.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_join_strings.snap deleted file mode 100644 index 3ea6bf18..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_join_strings.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = \"baz\" # \"qux\"}\n|\"#)" ---- -@article{foo, - bar = "baz" # "qux", -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_multiple_entries.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_multiple_entries.snap deleted file mode 100644 index 966f133a..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_multiple_entries.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, \nconsectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}\n\n@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, \nconsectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}\"\n|\"#)" ---- -@article{foo, - bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum - dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit - amet, consectetur adipiscing elit.}, -} - -@article{foo, - bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum - dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit - amet, consectetur adipiscing elit.}, -}" diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_parens.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_parens.snap deleted file mode 100644 index ca317db1..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_parens.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article(foo,)\n|\"#)" ---- -@article{foo, -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_preamble.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_preamble.snap deleted file mode 100644 index 6448e3a7..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_preamble.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@preamble{\n \"foo bar baz\" }\n|\"#)" ---- -@preamble{"foo bar baz"} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_string.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_string.snap deleted file mode 100644 index a1739290..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_string.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@string{foo=\"bar\"}\n|\"#)" ---- -@string{foo = "bar"} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_trailing_comma.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_trailing_comma.snap deleted file mode 100644 index dd5c7b49..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_trailing_comma.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = baz}\n|\"#)" ---- -@article{foo, - bar = baz, -} diff --git a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap b/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap deleted file mode 100644 index c52b8a93..00000000 --- a/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/lsp/text_document/formatting.rs -expression: "format(r#\"\n%! main.bib\n@article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nLorem ipsum dolor sit amet,\nconsectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}\n|\"#)" ---- -@article{foo, - bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum - dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit - amet, consectetur adipiscing elit.}, -}