summaryrefslogtreecommitdiff
path: root/support/texlab/tests/integration
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-30 03:01:26 +0000
committerNorbert Preining <norbert@preining.info>2022-12-30 03:01:26 +0000
commit844019377157163b461e0fd4a66592e61963a530 (patch)
tree32f61991c6a5acc3a3359ffc2cdefdd2aa004268 /support/texlab/tests/integration
parent55c69feeef908f49007708be194b7bb1c607f302 (diff)
CTAN sync 202212300301
Diffstat (limited to 'support/texlab/tests/integration')
-rw-r--r--support/texlab/tests/integration/lsp.rs4
-rw-r--r--support/texlab/tests/integration/lsp/client.rs165
-rw-r--r--support/texlab/tests/integration/lsp/fixture.rs125
-rw-r--r--support/texlab/tests/integration/lsp/text_document.rs13
-rw-r--r--support/texlab/tests/integration/lsp/text_document/completion.rs870
-rw-r--r--support/texlab/tests/integration/lsp/text_document/definition.rs142
-rw-r--r--support/texlab/tests/integration/lsp/text_document/did_change_configuration.rs39
-rw-r--r--support/texlab/tests/integration/lsp/text_document/document_highlight.rs62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/document_link.rs73
-rw-r--r--support/texlab/tests/integration/lsp/text_document/document_symbol.rs427
-rw-r--r--support/texlab/tests/integration/lsp/text_document/folding_range.rs97
-rw-r--r--support/texlab/tests/integration/lsp/text_document/formatting.rs148
-rw-r--r--support/texlab/tests/integration/lsp/text_document/hover.rs302
-rw-r--r--support/texlab/tests/integration/lsp/text_document/publish_diagnostics.rs264
-rw-r--r--support/texlab/tests/integration/lsp/text_document/references.rs275
-rw-r--r--support/texlab/tests/integration/lsp/text_document/rename.rs111
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_empty.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_open_brace.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_simple.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_empty.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_open_brace.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_word.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__begin_environment_without_snippet_support.snap68
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation.snap32
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_acronym.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace_multiple.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_open_brace.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_open_brace.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_simple.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_simple.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_open_brace.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_simple.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_word.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_bibtex.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple.snap69
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple_package.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_class.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_command_definition.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple_end.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_preamble.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_string.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_at_empty.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_article.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_preamble.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_string.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_complete_entry.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_closed.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_open.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_field_name.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_closed.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_open.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_open_brace.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_simple.snap18
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_closed_brace.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_open_brace.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_closed_brace.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_open_brace.snap67
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__label.snap73
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_begin.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_end.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_closed_brace.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_open_brace.snap62
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_command.snap19
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_environment.snap31
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__did_change_configuration__invalid_configuration.snap10
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_flat.snap97
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_nested.snap141
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_flat.snap61
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_nested.snap87
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_flat.snap61
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_nested.snap87
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_flat.snap61
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_nested.snap88
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_flat.snap79
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_nested.snap114
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_command.snap9
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_insert_braces.snap8
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_join_strings.snap9
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_multiple_entries.snap17
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_parens.snap8
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_preamble.snap7
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_string.snap7
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_trailing_comma.snap9
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap11
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_allowed.snap24
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_ignored.snap24
-rw-r--r--support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_none.snap39
-rw-r--r--support/texlab/tests/integration/lsp/workspace.rs1
-rw-r--r--support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_bibtex.snap43
-rw-r--r--support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_figure.snap25
-rw-r--r--support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_item.snap61
-rw-r--r--support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_math.snap43
-rw-r--r--support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_section.snap79
-rw-r--r--support/texlab/tests/integration/lsp/workspace/symbol.rs147
-rw-r--r--support/texlab/tests/integration/main.rs1
97 files changed, 0 insertions, 6801 deletions
diff --git a/support/texlab/tests/integration/lsp.rs b/support/texlab/tests/integration/lsp.rs
deleted file mode 100644
index 9ef1a4f2b4..0000000000
--- a/support/texlab/tests/integration/lsp.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-mod client;
-mod fixture;
-mod text_document;
-mod workspace;
diff --git a/support/texlab/tests/integration/lsp/client.rs b/support/texlab/tests/integration/lsp/client.rs
deleted file mode 100644
index 004422813a..0000000000
--- a/support/texlab/tests/integration/lsp/client.rs
+++ /dev/null
@@ -1,165 +0,0 @@
-use anyhow::{bail, Result};
-use crossbeam_channel::{Receiver, Sender};
-use lsp_server::{Connection, Message, Notification, Request, Response};
-use lsp_types::{
- notification::{Exit, Initialized},
- request::{Initialize, Shutdown},
- ClientCapabilities, ClientInfo, DidOpenTextDocumentParams, InitializeParams, InitializeResult,
- InitializedParams, Url,
-};
-use tempfile::{tempdir, TempDir};
-use texlab::Server;
-
-pub struct IncomingHandler {
- _handle: jod_thread::JoinHandle<Result<()>>,
- pub requests: Receiver<Request>,
- pub notifications: Receiver<Notification>,
- pub responses: Receiver<Response>,
-}
-
-impl IncomingHandler {
- pub fn spawn(receiver: Receiver<Message>) -> Result<Self> {
- let (req_sender, req_receiver) = crossbeam_channel::unbounded();
- let (not_sender, not_receiver) = crossbeam_channel::unbounded();
- let (res_sender, res_receiver) = crossbeam_channel::unbounded();
-
- let _handle = jod_thread::spawn(move || {
- for message in &receiver {
- match message {
- Message::Request(req) => req_sender.send(req)?,
- Message::Response(res) => res_sender.send(res)?,
- Message::Notification(not) => not_sender.send(not)?,
- };
- }
-
- Ok(())
- });
-
- Ok(Self {
- _handle,
- requests: req_receiver,
- notifications: not_receiver,
- responses: res_receiver,
- })
- }
-}
-
-pub struct ClientResult {
- pub directory: TempDir,
- pub incoming: IncomingHandler,
-}
-
-pub struct Client {
- outgoing: Sender<Message>,
- incoming: IncomingHandler,
- directory: TempDir,
- request_id: i32,
- _handle: jod_thread::JoinHandle,
-}
-
-impl Client {
- pub fn spawn() -> Result<Self> {
- let directory = tempdir()?;
- let (client, server) = Connection::memory();
- let incoming = IncomingHandler::spawn(client.receiver)?;
- let outgoing = client.sender;
- let server = Server::with_connection(server, directory.path().to_path_buf(), false);
- let _handle = jod_thread::spawn(move || {
- server.run().expect("server failed to run");
- });
-
- Ok(Self {
- outgoing,
- incoming,
- directory,
- request_id: 0,
- _handle,
- })
- }
-
- #[allow(deprecated)]
- pub fn initialize(
- &mut self,
- client_capabilities: ClientCapabilities,
- client_info: Option<ClientInfo>,
- ) -> Result<InitializeResult> {
- let result = self.request::<Initialize>(InitializeParams {
- process_id: None,
- root_path: None,
- root_uri: None,
- initialization_options: None,
- capabilities: client_capabilities,
- trace: None,
- workspace_folders: None,
- client_info,
- locale: None,
- })?;
-
- self.notify::<Initialized>(InitializedParams {})?;
- Ok(result)
- }
-
- pub fn request<R: lsp_types::request::Request>(
- &mut self,
- params: R::Params,
- ) -> Result<R::Result> {
- self.request_id += 1;
-
- self.outgoing
- .send(Request::new(self.request_id.into(), R::METHOD.into(), params).into())?;
-
- let response = self.incoming.responses.recv()?;
- assert_eq!(response.id, self.request_id.into());
-
- let result = match response.result {
- Some(result) => result,
- None => bail!("request failed: {:?}", response.error),
- };
-
- Ok(serde_json::from_value(result)?)
- }
-
- pub fn notify<N: lsp_types::notification::Notification>(
- &mut self,
- params: N::Params,
- ) -> Result<()> {
- self.outgoing
- .send(Notification::new(N::METHOD.into(), serde_json::to_value(params)?).into())?;
-
- Ok(())
- }
-
- pub fn open(&mut self, name: &str, language_id: &str, text: String) -> Result<()> {
- self.notify::<lsp_types::notification::DidOpenTextDocument>(DidOpenTextDocumentParams {
- text_document: lsp_types::TextDocumentItem {
- uri: self.uri(name)?,
- language_id: language_id.to_string(),
- version: 0,
- text,
- },
- })?;
-
- Ok(())
- }
-
- pub fn store_on_disk(&mut self, name: &str, text: &str) -> Result<()> {
- let path = self.directory.path().join(name);
- std::fs::create_dir_all(path.parent().unwrap())?;
- std::fs::write(path, text)?;
- Ok(())
- }
-
- pub fn shutdown(mut self) -> Result<ClientResult> {
- self.request::<Shutdown>(())?;
- self.notify::<Exit>(())?;
- Ok(ClientResult {
- directory: self.directory,
- incoming: self.incoming,
- })
- }
-
- pub fn uri(&self, name: &str) -> Result<Url> {
- Url::from_file_path(self.directory.path().join(name))
- .map_err(|()| anyhow::anyhow!("failed to create uri"))
- }
-}
diff --git a/support/texlab/tests/integration/lsp/fixture.rs b/support/texlab/tests/integration/lsp/fixture.rs
deleted file mode 100644
index 83d63cce60..0000000000
--- a/support/texlab/tests/integration/lsp/fixture.rs
+++ /dev/null
@@ -1,125 +0,0 @@
-use std::collections::BTreeMap;
-
-use anyhow::Result;
-use lsp_types::{Position, Range, TextDocumentIdentifier, TextDocumentPositionParams};
-use rustc_hash::FxHashMap;
-
-use crate::lsp::client::Client;
-
-#[derive(Debug, PartialEq, Eq, Clone, Hash)]
-enum Line<'a> {
- File(&'a str, &'a str),
- Plain(&'a str),
- Range(u32, u32, std::ops::Range<usize>),
- Cursor(usize),
- Empty,
-}
-
-fn parse_line(line: &str) -> Line {
- if let Some(name) = line.strip_prefix("%TEX ") {
- Line::File(name, "latex")
- } else if let Some(name) = line.strip_prefix("%BIB ") {
- Line::File(name, "bibtex")
- } else if let Some(name) = line.strip_prefix("%LOG ") {
- Line::File(name, "log")
- } else if let Some(text) = line.strip_prefix("%SRC ") {
- Line::Plain(text)
- } else if let Some(text) = line.strip_prefix("%CUR ") {
- let position = text.find('^').unwrap();
- Line::Cursor(position)
- } else if line.is_empty() {
- Line::Empty
- } else {
- let key1 = line[1..2].parse().unwrap();
- let key2 = line[3..4].parse().unwrap();
- let line = &line[5..];
- let range = line
- .find('^')
- .map_or(0..0, |start| start..(line.rfind('^').unwrap() + 1));
- Line::Range(key1, key2, range)
- }
-}
-
-#[derive(Debug, Default)]
-pub struct FileRange<'a> {
- pub name: &'a str,
- pub range: Range,
-}
-
-#[derive(Debug, Default)]
-pub struct File<'a> {
- pub name: &'a str,
- pub lang: &'a str,
- pub text: String,
-}
-
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
-pub struct FileCursor<'a> {
- pub name: &'a str,
- pub position: Position,
-}
-
-impl<'a> FileCursor<'a> {
- pub fn into_params(self, server: &Client) -> Result<TextDocumentPositionParams> {
- let text_document = TextDocumentIdentifier::new(server.uri(self.name)?);
- Ok(TextDocumentPositionParams {
- text_document,
- position: self.position,
- })
- }
-}
-
-#[derive(Debug, Default)]
-pub struct Fixture<'a> {
- pub files: Vec<File<'a>>,
- pub cursor: Option<FileCursor<'a>>,
- pub ranges: BTreeMap<u32, FxHashMap<u32, FileRange<'a>>>,
-}
-
-pub fn parse(input: &str) -> Fixture {
- let mut fixture = Fixture::default();
- let mut file = File::default();
- let mut file_line_index = 0;
- for line in input.lines().map(parse_line) {
- match line {
- Line::File(name, lang) => {
- if !file.name.is_empty() {
- fixture.files.push(file);
- file = File::default();
- }
-
- file.name = name;
- file.lang = lang;
- file_line_index = 0;
- }
- Line::Plain(line) => {
- file.text.push_str(line);
- file.text.push('\n');
- file_line_index += 1;
- }
- Line::Range(key1, key2, range) => {
- let line = file_line_index - 1;
- let start = Position::new(line, range.start.try_into().unwrap());
- let end = Position::new(line, range.end.try_into().unwrap());
- let range = Range::new(start, end);
- fixture.ranges.entry(key1).or_default().insert(
- key2,
- FileRange {
- name: file.name,
- range,
- },
- );
- }
- Line::Cursor(position) => {
- fixture.cursor = Some(FileCursor {
- name: file.name,
- position: Position::new(file_line_index - 1, position.try_into().unwrap()),
- });
- }
- Line::Empty => {}
- };
- }
-
- fixture.files.push(file);
- fixture
-}
diff --git a/support/texlab/tests/integration/lsp/text_document.rs b/support/texlab/tests/integration/lsp/text_document.rs
deleted file mode 100644
index 283132d3c4..0000000000
--- a/support/texlab/tests/integration/lsp/text_document.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#[cfg(feature = "completion")]
-mod completion;
-mod definition;
-mod did_change_configuration;
-mod document_highlight;
-mod document_link;
-mod document_symbol;
-mod folding_range;
-mod formatting;
-mod hover;
-mod publish_diagnostics;
-mod references;
-mod rename;
diff --git a/support/texlab/tests/integration/lsp/text_document/completion.rs b/support/texlab/tests/integration/lsp/text_document/completion.rs
deleted file mode 100644
index 5e160904fe..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/completion.rs
+++ /dev/null
@@ -1,870 +0,0 @@
-use anyhow::Result;
-use insta::assert_json_snapshot;
-use lsp_types::{
- request::{Completion, ResolveCompletionItem},
- ClientCapabilities, CompletionItem, CompletionList, CompletionParams, CompletionResponse,
- CompletionTextEdit, Range,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn complete(fixture: &str) -> Result<Vec<CompletionItem>, anyhow::Error> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let range = fixture
- .ranges
- .values()
- .next()
- .and_then(|map| map.values().next())
- .map_or_else(
- || {
- let position = fixture.cursor.unwrap().position;
- Range::new(position, position)
- },
- |file_range| file_range.range,
- );
-
- let actual_list = client
- .request::<Completion>(CompletionParams {
- text_document_position: fixture.cursor.unwrap().into_params(&client)?,
- partial_result_params: Default::default(),
- work_done_progress_params: Default::default(),
- context: None,
- })?
- .map_or(CompletionList::default(), |actual| match actual {
- CompletionResponse::List(list) => list,
- CompletionResponse::Array(_) => unreachable!(),
- });
-
- for item in &actual_list.items {
- if let Some(CompletionTextEdit::Edit(edit)) = item.text_edit.as_ref() {
- assert_eq!(edit.range, range);
- }
- }
-
- let actual_items = actual_list
- .items
- .into_iter()
- .take(5)
- .map(|item| client.request::<ResolveCompletionItem>(item))
- .collect::<Result<Vec<_>>>()?;
-
- client.shutdown()?;
- Ok(actual_items)
-}
-
-macro_rules! assert_items {
- ($items:expr) => {
- assert_json_snapshot!($items, {
- "[].data" => "[data]",
- "[].sortText" => "[sortText]",
- "[].documentation" => "[documentation]",
- "[].textEdit.range" => "[range]",
- "[]" => insta::sorted_redaction()
- });
- };
-}
-
-#[test]
-fn acronym_ref_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \acrshort{f}
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn acronym_ref_empty() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \acrshort{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn acronym_ref_after_group() -> Result<()> {
- let actual_items = complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \acrshort{}
-%CUR ^
-%1.1 ^"#,
- )?;
-
- assert_eq!(actual_items, Vec::new());
- Ok(())
-}
-
-#[test]
-fn acronym_ref_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \acrshort{f
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn glossary_ref_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \gls{f}
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn glossary_ref_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}
-%SRC \gls{f
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn argument_empty() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{amsfonts}
-%SRC \mathbb{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn argument_word() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{amsfonts}
-%SRC \mathbb{A}
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn argument_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{amsfonts}
-%SRC \mathbb{
-%CUR ^
-%SRC Test"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn argument_open_brace_unrelated() -> Result<()> {
- let actual_items = complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{amsfonts}
-%SRC \mathbb{}{
-%CUR ^
-%SRC Test"#,
- )?;
-
- assert_eq!(actual_items, Vec::new());
- Ok(())
-}
-
-#[test]
-fn begin_environment_without_snippet_support() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \beg
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn citation() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \bibliography{main}
-%SRC \begin{document}
-%SRC \cite{
-%CUR ^
-%SRC \end{document}
-
-%BIB main.bib
-%SRC @article{foo:2019,
-%SRC author = {Foo Bar},
-%SRC title = {Baz Qux},
-%SRC year = {2019},
-%SRC }
-%SRC
-%SRC @article{bar:2005,}"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn citation_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{
-%CUR ^
-
-%BIB main.bib
-%SRC @article{foo,}"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn citation_open_brace_multiple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{foo,a
-%CUR ^
-%1.1 ^
-
-%BIB main.bib
-%SRC @article{foo,}"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn citation_acronym() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \DeclareAcronym{foo}{cite={}}
-%CUR ^
-
-%BIB main.bib
-%SRC @article{foo,}"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn citation_after_brace() -> Result<()> {
- let actual_items = complete(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \bibliography{main}
-%SRC \begin{document}
-%SRC \cite{}
-%CUR ^
-%SRC \end{document}
-
-%BIB main.bib
-%SRC @article{foo,}"#,
- )?;
-
- assert_eq!(actual_items, Vec::new());
- Ok(())
-}
-
-#[test]
-fn color_model_definition_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \definecolor{foo}{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_model_definition_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \definecolor{foo}{
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_model_definition_set_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \definecolorset{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_model_definition_set_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \definecolorset{
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \color{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_word() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \color{re}
-%CUR ^
-%1.1 ^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn color_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \color{
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_command_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_command_simple_before() -> Result<()> {
- let actual_items = complete(
- r#"
-%TEX main.tex
-%SRC \
-%CUR ^"#,
- )?;
-
- assert_eq!(actual_items, Vec::new());
- Ok(())
-}
-
-#[test]
-fn component_command_simple_package() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{lipsum}
-%SRC \lips
-%CUR ^
-%1.1 ^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_command_bibtex() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{b,
-%SRC c = {\LaT }
-%CUR ^
-%1.1 ^^^
-%SRC }"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_environment_simple() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \begin{doc
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_environment_simple_end() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \begin{document}
-%SRC \end{
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_environment_class() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \begin{thein}
-%CUR ^
-%1.1 ^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn component_environment_command_definition() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newcommand{\foo}{\begin{doc}
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_at_empty() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_before_preamble() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @preamble
-%CUR ^
-%1.1 ^^^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_before_string() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @string
-%CUR ^
-%1.1 ^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_before_article() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article
-%CUR ^
-%1.1 ^^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_after_preamble() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @preamble{
-%CUR ^
-%1.1 ^^^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_after_string() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @string{
-%CUR ^
-%1.1 ^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn entry_type_complete_entry() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = {foo}}
-%CUR ^
-%1.1 ^^^^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn field_empty_entry_open() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo,
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn field_empty_entry_closed() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo,}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn field_entry_field_name() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo, a
-%CUR ^
-%1.1 ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn field_entry_two_fields_name_open() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = bar, edit
-%CUR ^
-%1.1 ^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn field_entry_two_fields_name_closed() -> Result<()> {
- assert_items!(complete(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = bar, edit}
-%CUR ^
-%1.1 ^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn import_package_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{lips
-%CUR ^
-%1.1 ^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn import_package_closed_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepackage{lips}
-%CUR ^
-%1.1 ^^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn import_class_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \documentclass{art \foo
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn import_class_closed_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \documentclass{art}
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn label() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX foo.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \usepackage{amsmath}
-%SRC \usepackage{caption}
-%SRC \usepackage{amsthm}
-%SRC \newtheorem{lemma}{Lemma}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \section{Foo}%
-%SRC \label{sec:foo}
-%SRC
-%SRC \begin{equation}%
-%SRC \label{eq:foo}
-%SRC 1 + 1 = 2
-%SRC \end{equation}
-%SRC
-%SRC \begin{equation}%
-%SRC \label{eq:bar}
-%SRC 1 + 1 = 2
-%SRC \end{equation}
-%SRC
-%SRC \begin{figure}%
-%SRC \LaTeX{}
-%SRC \caption{Baz}%
-%SRC \label{fig:baz}
-%SRC \end{figure}
-%SRC
-%SRC \begin{lemma}%
-%SRC \label{thm:foo}
-%SRC 1 + 1 = 2
-%SRC \end{lemma}
-%SRC
-%SRC \include{bar}
-%SRC
-%SRC \end{document}
-
-%TEX bar.tex
-%SRC \section{Bar}%
-%SRC \label{sec:bar}
-%SRC
-%SRC Lorem ipsum dolor sit amet.
-%SRC \ref{}
-%CUR ^
-
-%TEX foo.aux
-%SRC \relax
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Baz\relax }}{1}\protected@file@percent }
-%SRC \providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
-%SRC \newlabel{fig:baz}{{1}{1}}
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
-%SRC \newlabel{sec:foo}{{1}{1}}
-%SRC \newlabel{eq:foo}{{1}{1}}
-%SRC \newlabel{eq:bar}{{2}{1}}
-%SRC \newlabel{thm:foo}{{1}{1}}
-%SRC \@input{bar.aux}"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn theorem_begin() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newtheorem{lemma}{Lemma}
-%SRC \begin{lem
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn theorem_end() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \newtheorem{lemma}{Lemma}
-%SRC \begin{}
-%SRC \end{lem
-%CUR ^
-%1.1 ^^^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn tikz_library_open_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepgflibrary{
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn tikz_library_closed_brace() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \usepgflibrary{}
-%CUR ^"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn test_user_command() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \foobar
-%SRC \fooba
-%CUR ^
-%1.1 ^^^^^
-%SRC \begin{foo}
-%SRC \end{foo}
-%SRC \begin{fo}
-"#
- )?);
-
- Ok(())
-}
-
-#[test]
-fn test_user_environment() -> Result<()> {
- assert_items!(complete(
- r#"
-%TEX main.tex
-%SRC \foobar
-%SRC \fooba
-%SRC \begin{foo}
-%SRC \end{foo}
-%SRC \begin{fo}
-%CUR ^
-%1.1 ^^
-"#
- )?);
-
- Ok(())
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/definition.rs b/support/texlab/tests/integration/lsp/text_document/definition.rs
deleted file mode 100644
index 203c350464..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/definition.rs
+++ /dev/null
@@ -1,142 +0,0 @@
-use anyhow::Result;
-use assert_unordered::assert_eq_unordered;
-use lsp_types::{
- request::GotoDefinition, ClientCapabilities, GotoDefinitionParams, GotoDefinitionResponse,
- LocationLink,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let mut expected_links = Vec::new();
- for ranges in fixture.ranges.values() {
- expected_links.push(LocationLink {
- origin_selection_range: Some(ranges[&1].range),
- target_uri: client.uri(ranges[&2].name)?,
- target_range: ranges[&2].range,
- target_selection_range: ranges[&3].range,
- });
- }
-
- let actual_links = client
- .request::<GotoDefinition>(GotoDefinitionParams {
- text_document_position_params: fixture.cursor.unwrap().into_params(&client)?,
- partial_result_params: Default::default(),
- work_done_progress_params: Default::default(),
- })?
- .map_or(Vec::new(), |actual| match actual {
- GotoDefinitionResponse::Link(links) => links,
- GotoDefinitionResponse::Array(_) | GotoDefinitionResponse::Scalar(_) => unreachable!(),
- });
-
- client.shutdown()?;
-
- assert_eq_unordered!(actual_links, expected_links);
- Ok(())
-}
-
-#[test]
-fn command_definition() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \DeclareMathOperator{\foo}{foo}
-%1.3 ^^^^
-%1.2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-%SRC \foo
-%CUR ^
-%1.1 ^^^^
-"#,
- )
-}
-
-#[test]
-fn document() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \addbibresource{baz.bib}
-%CUR ^
-%1.1 ^^^^^^^
-
-%TEX bar.bib
-%SRC @article{foo, bar = {baz}}
-
-%TEX baz.bib
-%SRC @article{foo, bar = {baz}}
-%1.3
-%1.2
-"#,
- )
-}
-
-#[test]
-fn entry() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \addbibresource{baz.bib}
-%SRC \cite{foo}
-%CUR ^
-%1.1 ^^^
-
-%BIB bar.bib
-%SRC @article{foo, bar = {baz}}
-
-%BIB baz.bib
-%SRC @article{foo, bar = {baz}}
-%1.3 ^^^
-%1.2 ^^^^^^^^^^^^^^^^^^^^^^^^^^
-"#,
- )
-}
-
-#[test]
-fn string_simple() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {bar}}
-%1.3 ^^^
-%1.2 ^^^^^^^^^^^^^^^^^^^^
-%SRC @article{bar, author = foo}
-%CUR ^
-%1.1 ^^^
-"#,
- )
-}
-
-#[test]
-fn string_join() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {bar}}
-%1.3 ^^^
-%1.2 ^^^^^^^^^^^^^^^^^^^^
-%SRC @article{bar, author = foo # "bar"}
-%CUR ^
-%1.1 ^^^
-"#,
- )
-}
-
-#[test]
-fn string_field() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {bar}}
-%SRC @article{bar, author = foo # "bar"}
-%CUR ^
-"#,
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/did_change_configuration.rs b/support/texlab/tests/integration/lsp/text_document/did_change_configuration.rs
deleted file mode 100644
index c45dca094b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/did_change_configuration.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-use anyhow::Result;
-use insta::assert_snapshot;
-use lsp_types::{
- notification::{DidChangeConfiguration, Notification, ShowMessage},
- ClientCapabilities, DidChangeConfigurationParams, ShowMessageParams,
-};
-
-use crate::lsp::client::Client;
-
-#[test]
-fn invalid_configuration() -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- client.notify::<DidChangeConfiguration>(DidChangeConfigurationParams {
- settings: serde_json::json!({
- "diagnostics": {
- "allowedPatterns": ["\\"]
- }
- }),
- })?;
-
- let result = client.shutdown()?;
- let message = result
- .incoming
- .notifications
- .into_iter()
- .filter_map(|notification| {
- notification
- .extract::<ShowMessageParams>(ShowMessage::METHOD)
- .ok()
- })
- .find(|params| params.message.contains("configuration"))
- .unwrap()
- .message;
-
- assert_snapshot!(message);
- Ok(())
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/document_highlight.rs b/support/texlab/tests/integration/lsp/text_document/document_highlight.rs
deleted file mode 100644
index 92102ce0ca..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/document_highlight.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-use anyhow::Result;
-use assert_unordered::assert_eq_unordered;
-use lsp_types::{
- request::DocumentHighlightRequest, ClientCapabilities, DocumentHighlight,
- DocumentHighlightKind, DocumentHighlightParams,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let mut expected_highlights = Vec::new();
- for ranges in fixture.ranges.values() {
- let (i, file_range) = ranges.iter().next().unwrap();
- let kind = match i {
- 1 => DocumentHighlightKind::TEXT,
- 2 => DocumentHighlightKind::READ,
- 3 => DocumentHighlightKind::WRITE,
- _ => unreachable!(),
- };
-
- expected_highlights.push(DocumentHighlight {
- range: file_range.range,
- kind: Some(kind),
- });
- }
-
- let actual_highlights = client
- .request::<DocumentHighlightRequest>(DocumentHighlightParams {
- text_document_position_params: fixture.cursor.unwrap().into_params(&client)?,
- partial_result_params: Default::default(),
- work_done_progress_params: Default::default(),
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- assert_eq_unordered!(actual_highlights, expected_highlights);
- Ok(())
-}
-
-#[test]
-fn test_label() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \label{foo}
-%CUR ^
-%1.3 ^^^
-%SRC \ref{foo}
-%2.2 ^^^
-%SRC \label{bar}
-"#,
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/document_link.rs b/support/texlab/tests/integration/lsp/text_document/document_link.rs
deleted file mode 100644
index 1a773fd478..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/document_link.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-use anyhow::Result;
-use assert_unordered::assert_eq_unordered;
-use lsp_types::{
- request::DocumentLinkRequest, ClientCapabilities, DocumentLink, DocumentLinkParams,
- TextDocumentIdentifier,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let mut expected_links = Vec::new();
- for ranges in fixture.ranges.values() {
- expected_links.push(DocumentLink {
- range: ranges[&1].range,
- target: Some(client.uri(ranges[&2].name)?),
- tooltip: None,
- data: None,
- });
- }
-
- let actual_links = client
- .request::<DocumentLinkRequest>(DocumentLinkParams {
- text_document: TextDocumentIdentifier::new(client.uri(fixture.cursor.unwrap().name)?),
- work_done_progress_params: Default::default(),
- partial_result_params: Default::default(),
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- assert_eq_unordered!(actual_links, expected_links);
- Ok(())
-}
-
-#[test]
-fn document_include() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \input{bar.tex}
-%1.1 ^^^^^^^
-%CUR ^
-
-%TEX bar.tex
-%SRC
-%1.2
-"#,
- )
-}
-
-#[test]
-fn document_import() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \import{bar/}{baz}
-%1.1 ^^^
-%CUR ^
-
-%TEX bar/baz.tex
-%SRC
-%1.2
-"#,
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/document_symbol.rs b/support/texlab/tests/integration/lsp/text_document/document_symbol.rs
deleted file mode 100644
index 50bb9db3fe..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/document_symbol.rs
+++ /dev/null
@@ -1,427 +0,0 @@
-use anyhow::Result;
-use insta::{assert_json_snapshot, internals::Redaction};
-use lsp_types::{
- request::DocumentSymbolRequest, DocumentSymbolParams, DocumentSymbolResponse,
- TextDocumentIdentifier, Url,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-struct SymbolResult {
- response: Option<DocumentSymbolResponse>,
- uri_redaction: Redaction,
-}
-
-fn find_symbols(fixture: &str, client_capabilities: serde_json::Value) -> Result<SymbolResult> {
- let mut client = Client::spawn()?;
- client.initialize(serde_json::from_value(client_capabilities)?, None)?;
-
- let fixture = fixture::parse(fixture);
- let file = fixture.files.into_iter().next().unwrap();
- client.open(file.name, file.lang, file.text)?;
-
- let response = client.request::<DocumentSymbolRequest>(DocumentSymbolParams {
- text_document: TextDocumentIdentifier::new(client.uri(file.name)?),
- work_done_progress_params: Default::default(),
- partial_result_params: Default::default(),
- })?;
-
- let result = client.shutdown()?;
-
- let uri = Url::from_directory_path(result.directory.path()).unwrap();
- let uri_redaction = insta::dynamic_redaction(move |content, _path| {
- content.as_str().unwrap().replace(uri.as_str(), "[tmp]/")
- });
-
- Ok(SymbolResult {
- response,
- uri_redaction,
- })
-}
-
-macro_rules! assert_symbols {
- ($result:expr) => {
- let result = $result;
- assert_json_snapshot!(result.response, {
- "[].location.uri" => result.uri_redaction
- });
- };
-}
-
-#[test]
-fn enumerate_nested() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{enumerate}
-%SRC \item\label{it:foo} Foo
-%SRC \item\label{it:bar} Bar
-%SRC \item[Baz] Baz
-%SRC \item[Qux]\label{it:qux} Qux
-%SRC \end{enumerate}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{it:foo}{{1}{1}}
-%SRC \newlabel{it:qux}{{2}{1}}
-"#,
- serde_json::json!({
- "textDocument": {
- "documentSymbol": {
- "hierarchicalDocumentSymbolSupport": true,
- },
- },
- }),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn enumerate_flat() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{enumerate}
-%SRC \item\label{it:foo} Foo
-%SRC \item\label{it:bar} Bar
-%SRC \item[Baz] Baz
-%SRC \item[Qux]\label{it:qux} Qux
-%SRC \end{enumerate}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{it:foo}{{1}{1}}
-%SRC \newlabel{it:qux}{{2}{1}}
-"#,
- serde_json::json!({}),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn equation_nested() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{equation}\label{eq:foo}
-%SRC Foo
-%SRC \end{equation}
-%SRC
-%SRC \begin{equation}\label{eq:bar}
-%SRC Bar
-%SRC \end{equation}
-%SRC
-%SRC \begin{equation}
-%SRC Baz
-%SRC \end{equation}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{eq:foo}{{1}{1}}
-"#,
- serde_json::json!({
- "textDocument": {
- "documentSymbol": {
- "hierarchicalDocumentSymbolSupport": true,
- },
- },
- }),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn equation_flat() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{equation}\label{eq:foo}
-%SRC Foo
-%SRC \end{equation}
-%SRC
-%SRC \begin{equation}\label{eq:bar}
-%SRC Bar
-%SRC \end{equation}
-%SRC
-%SRC \begin{equation}
-%SRC Baz
-%SRC \end{equation}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{eq:foo}{{1}{1}}
-"#,
- serde_json::json!({}),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn float_nested() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{figure}
-%SRC Foo
-%SRC \caption{Foo}\label{fig:foo}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Bar
-%SRC \caption{Bar}\label{fig:bar}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Baz
-%SRC \caption{Baz}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Qux
-%SRC \end{figure}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Foo}}{1}\protected@file@percent }
-%SRC \newlabel{fig:foo}{{1}{1}}
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Bar}}{1}\protected@file@percent }
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Baz}}{1}\protected@file@percent }
-"#,
- serde_json::json!({
- "textDocument": {
- "documentSymbol": {
- "hierarchicalDocumentSymbolSupport": true,
- },
- },
- }),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn float_flat() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{figure}
-%SRC Foo
-%SRC \caption{Foo}\label{fig:foo}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Bar
-%SRC \caption{Bar}\label{fig:bar}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Baz
-%SRC \caption{Baz}
-%SRC \end{figure}
-%SRC
-%SRC \begin{figure}
-%SRC Qux
-%SRC \end{figure}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Foo}}{1}\protected@file@percent }
-%SRC \newlabel{fig:foo}{{1}{1}}
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Bar}}{1}\protected@file@percent }
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Baz}}{1}\protected@file@percent }
-"#,
- serde_json::json!({}),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn section_nested() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \section{Foo}
-%SRC
-%SRC \section{Bar}\label{sec:bar}
-%SRC
-%SRC \subsection{Baz}\label{sec:baz}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{1}\protected@file@percent }
-%SRC \newlabel{sec:bar}{{2}{1}}
-"#,
- serde_json::json!({
- "textDocument": {
- "documentSymbol": {
- "hierarchicalDocumentSymbolSupport": true,
- },
- },
- }),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn section_flat() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \section{Foo}
-%SRC
-%SRC \section{Bar}\label{sec:bar}
-%SRC
-%SRC \subsection{Baz}\label{sec:baz}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{1}\protected@file@percent }
-%SRC \newlabel{sec:bar}{{2}{1}}
-"#,
- serde_json::json!({}),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn theorem_nested() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \usepackage{amsthm}
-%SRC \newtheorem{lemma}{Lemma}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{lemma}[Foo]\label{thm:foo}
-%SRC Foo
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}\label{thm:bar}
-%SRC Bar
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}\label{thm:baz}
-%SRC Baz
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}[Qux]
-%SRC Qux
-%SRC \end{lemma}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{thm:foo}{{1}{1}}
-%SRC \newlabel{thm:bar}{{2}{1}}
-"#,
- serde_json::json!({
- "textDocument": {
- "documentSymbol": {
- "hierarchicalDocumentSymbolSupport": true,
- },
- },
- }),
- )?);
-
- Ok(())
-}
-
-#[test]
-fn theorem_flat() -> Result<()> {
- assert_symbols!(find_symbols(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \usepackage{amsthm}
-%SRC \newtheorem{lemma}{Lemma}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \begin{lemma}[Foo]\label{thm:foo}
-%SRC Foo
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}\label{thm:bar}
-%SRC Bar
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}\label{thm:baz}
-%SRC Baz
-%SRC \end{lemma}
-%SRC
-%SRC \begin{lemma}[Qux]
-%SRC Qux
-%SRC \end{lemma}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \newlabel{thm:foo}{{1}{1}}
-%SRC \newlabel{thm:bar}{{2}{1}}
-"#,
- serde_json::json!({}),
- )?);
-
- Ok(())
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/folding_range.rs b/support/texlab/tests/integration/lsp/text_document/folding_range.rs
deleted file mode 100644
index 1d75ba3e0e..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/folding_range.rs
+++ /dev/null
@@ -1,97 +0,0 @@
-use anyhow::Result;
-use assert_unordered::assert_eq_unordered;
-use lsp_types::{
- request::FoldingRangeRequest, ClientCapabilities, FoldingRange, FoldingRangeKind,
- FoldingRangeParams, TextDocumentIdentifier,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str, expected_ranges: Vec<(u32, u32, u32, u32)>) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let actual_foldings = client
- .request::<FoldingRangeRequest>(FoldingRangeParams {
- text_document: TextDocumentIdentifier::new(client.uri(fixture.cursor.unwrap().name)?),
- work_done_progress_params: Default::default(),
- partial_result_params: Default::default(),
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- let expected_foldings = expected_ranges
- .into_iter()
- .map(
- |(start_line, start_character, end_line, end_character)| FoldingRange {
- start_line,
- start_character: Some(start_character),
- end_line,
- end_character: Some(end_character),
- kind: Some(FoldingRangeKind::Region),
- },
- )
- .collect();
-
- assert_eq_unordered!(actual_foldings, expected_foldings);
- Ok(())
-}
-
-#[test]
-fn latex() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \begin{document}
-%SRC \section{Foo}
-%SRC foo
-%SRC \subsection{Bar}
-%SRC bar
-%SRC \section{Baz}
-%SRC baz
-%SRC \section{Qux}
-%SRC \end{document}
-%CUR ^
-"#,
- vec![
- (0, 0, 8, 14),
- (1, 4, 4, 7),
- (3, 4, 4, 7),
- (5, 4, 6, 7),
- (7, 4, 7, 17),
- ],
- )
-}
-
-#[test]
-fn bibtex() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC some junk
-%SRC here
-%SRC
-%SRC @article{foo,
-%SRC author = {bar},
-%SRC title = {baz}
-%SRC }
-%SRC
-%SRC @string{foo = "bar"}
-%SRC
-%SRC @comment{foo,
-%SRC author = {bar},
-%SRC title = {baz}
-%SRC }
-%SRC
-%SRC @preamble{"foo"}
-%CUR ^
-"#,
- vec![(3, 0, 6, 1), (8, 0, 8, 20), (15, 0, 15, 16)],
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/formatting.rs b/support/texlab/tests/integration/lsp/text_document/formatting.rs
deleted file mode 100644
index a0c02bf4b1..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/formatting.rs
+++ /dev/null
@@ -1,148 +0,0 @@
-use anyhow::Result;
-use insta::assert_snapshot;
-use lsp_types::{
- request::Formatting, ClientCapabilities, DocumentFormattingParams, FormattingOptions,
- TextDocumentIdentifier,
-};
-use texlab::{LineIndex, LineIndexExt};
-
-use crate::lsp::{client::Client, fixture};
-
-fn format(fixture: &str) -> Result<String> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- let file = fixture.files.into_iter().next().unwrap();
- let old_text = file.text.clone();
- client.open(file.name, file.lang, file.text)?;
-
- let actual_edits = client
- .request::<Formatting>(DocumentFormattingParams {
- text_document: TextDocumentIdentifier::new(client.uri(file.name)?),
- work_done_progress_params: Default::default(),
- options: FormattingOptions {
- insert_spaces: true,
- tab_size: 4,
- ..Default::default()
- },
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- let line_index = LineIndex::new(&old_text);
- let mut actual_text = old_text;
- for edit in actual_edits.into_iter().rev() {
- let range = line_index.offset_lsp_range(edit.range);
- actual_text.replace_range::<std::ops::Range<usize>>(range.into(), &edit.new_text);
- }
-
- Ok(actual_text)
-}
-
-#[test]
-fn bibtex_internal_wrap_long_lines() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.
-%SRC Lorem ipsum dolor sit amet,
-%SRC consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_multiple_entries() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet,
-%SRC consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}
-%SRC
-%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet,
-%SRC consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}""#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_trailing_comma() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = baz}"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_insert_braces() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = baz,"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_command() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = "\baz",}"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_join_strings() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = "baz" # "qux"}"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_parens() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @article(foo,)"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_string() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @string{foo="bar"}"#,
- )?);
-
- Ok(())
-}
-
-#[test]
-fn bibtex_internal_preamble() -> Result<()> {
- assert_snapshot!(format(
- r#"
-%BIB main.bib
-%SRC @preamble{
-%SRC "foo bar baz" }"#,
- )?);
-
- Ok(())
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/hover.rs b/support/texlab/tests/integration/lsp/text_document/hover.rs
deleted file mode 100644
index 2a9e8c271f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/hover.rs
+++ /dev/null
@@ -1,302 +0,0 @@
-use anyhow::Result;
-use lsp_types::{
- request::HoverRequest, ClientCapabilities, Hover, HoverContents, HoverParams, MarkupContent,
- MarkupKind,
-};
-use texlab::{component_db::COMPONENT_DATABASE, LANGUAGE_DATA};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str, contents: Option<HoverContents>) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let range = fixture
- .ranges
- .values()
- .next()
- .and_then(|map| map.values().next())
- .map(|file_range| file_range.range);
-
- let actual_hover = client.request::<HoverRequest>(HoverParams {
- text_document_position_params: fixture.cursor.unwrap().into_params(&client)?,
- work_done_progress_params: Default::default(),
- })?;
-
- client.shutdown()?;
-
- let expected_hover = contents.map(|contents| Hover { range, contents });
-
- assert_eq!(actual_hover, expected_hover);
- Ok(())
-}
-
-#[test]
-fn empty_latex_document() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn empty_bibtex_document() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn citation_inside_cite() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = {Foo Bar}, title = {Baz Qux}, year = 1337}
-
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{foo}
-%CUR ^
-%1.1 ^^^
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::Markdown,
- value: "F. Bar: \"Baz Qux\". (1337).".to_string(),
- })),
- )
-}
-
-#[test]
-fn citation_inside_entry() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = {Foo Bar}, title = {Baz Qux}, year = 1337}
-%CUR ^
-%1.1 ^^^
-
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{foo}
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::Markdown,
- value: "F. Bar: \"Baz Qux\". (1337).".to_string(),
- })),
- )
-}
-
-#[test]
-fn component_known_package() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \usepackage{amsmath}
-%CUR ^
-%1.1 ^^^^^^^
-"#,
- COMPONENT_DATABASE
- .documentation("amsmath")
- .map(HoverContents::Markup),
- )
-}
-
-#[test]
-fn component_unknown_class() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \documentclass{abcdefghijklmnop}
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn entry_type_known_type() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo,}
-%CUR ^
-%1.1 ^^^^^^^^
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::Markdown,
- value: LANGUAGE_DATA
- .entry_type_documentation("article")
- .unwrap()
- .to_string(),
- })),
- )
-}
-
-#[test]
-fn entry_type_unknown_field() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @foo{bar,}
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn entry_type_key() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @foo{bar,}
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn field_known() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, author = bar}
-%CUR ^
-%1.1 ^^^^^^
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::Markdown,
- value: LANGUAGE_DATA
- .field_documentation("author")
- .unwrap()
- .to_string(),
- })),
- )
-}
-
-#[test]
-fn field_unknown() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = baz}
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn section() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \section{Foo}
-%SRC \label{sec:foo}
-%CUR ^
-%1.1 ^^^^^^^
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::PlainText,
- value: "Section (Foo)".to_string(),
- })),
- )
-}
-
-#[test]
-fn string_inside_reference() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = "Foo"}
-%SRC @string{bar = "Bar"}
-%SRC @article{baz, author = bar}
-%CUR ^
-%1.1 ^^^
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::PlainText,
- value: "Bar".to_string(),
- })),
- )
-}
-
-#[test]
-fn string_inside_field() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = "Foo"}
-%SRC @string{bar = "Bar"}
-%SRC @article{baz, author = bar}
-%CUR ^
-"#,
- None,
- )
-}
-
-#[test]
-fn label_theorem_child_file() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \newtheorem{lemma}{Lemma}
-%SRC \include{child}
-%SRC \ref{thm:foo}
-%CUR ^
-%1.1 ^^^^^^^
-
-%TEX child.tex
-%SRC \begin{lemma}\label{thm:foo}
-%SRC 1 + 1 = 2
-%SRC \end{lemma}
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::PlainText,
- value: "Lemma".to_string(),
- })),
- )
-}
-
-#[test]
-fn label_theorem_child_file_mumber() -> Result<()> {
- check(
- r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \newtheorem{lemma}{Lemma}
-%SRC \include{child}
-%SRC \ref{thm:foo}
-%CUR ^
-%1.1 ^^^^^^^
-
-%TEX child.tex
-%SRC \begin{lemma}[Foo]\label{thm:foo}
-%SRC 1 + 1 = 2
-%SRC \end{lemma}
-
-%TEX child.aux
-%SRC \newlabel{thm:foo}{{1}{1}{Foo}{lemma.1}{}}
-"#,
- Some(HoverContents::Markup(MarkupContent {
- kind: MarkupKind::PlainText,
- value: "Lemma 1 (Foo)".to_string(),
- })),
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/publish_diagnostics.rs b/support/texlab/tests/integration/lsp/text_document/publish_diagnostics.rs
deleted file mode 100644
index 7e406b5319..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/publish_diagnostics.rs
+++ /dev/null
@@ -1,264 +0,0 @@
-use anyhow::Result;
-use insta::{assert_json_snapshot, internals::Redaction};
-use lsp_types::{
- notification::{
- DidChangeConfiguration, DidChangeWatchedFiles, Notification, PublishDiagnostics,
- },
- ClientCapabilities, Diagnostic, DidChangeConfigurationParams, DidChangeWatchedFilesParams,
- FileChangeType, FileEvent, PublishDiagnosticsParams, Url,
-};
-use rustc_hash::FxHashMap;
-
-use crate::lsp::{client::Client, fixture};
-
-struct DiagnosticResult {
- all_diagnostics: FxHashMap<Url, Vec<Diagnostic>>,
- uri_redaction: Redaction,
-}
-
-fn find_diagnostics(fixture: &str, settings: serde_json::Value) -> Result<DiagnosticResult> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let mut disk_files = Vec::new();
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- if file.lang == "log" {
- client.store_on_disk(file.name, &file.text)?;
- disk_files.push(client.uri(file.name)?);
- } else {
- client.open(file.name, file.lang, file.text)?;
- }
- }
-
- client.notify::<DidChangeWatchedFiles>(DidChangeWatchedFilesParams {
- changes: disk_files
- .into_iter()
- .map(|uri| FileEvent::new(uri, FileChangeType::CHANGED))
- .collect(),
- })?;
-
- client.notify::<DidChangeConfiguration>(DidChangeConfigurationParams { settings })?;
-
- let result = client.shutdown()?;
-
- let uri = Url::from_directory_path(result.directory.path()).unwrap();
- let uri_redaction = insta::dynamic_redaction(move |content, _path| {
- content.as_str().unwrap().replace(uri.as_str(), "[tmp]/")
- });
-
- let all_diagnostics = result
- .incoming
- .notifications
- .into_iter()
- .filter_map(|notification| {
- notification
- .extract::<PublishDiagnosticsParams>(PublishDiagnostics::METHOD)
- .ok()
- })
- .map(|params| (params.uri, params.diagnostics))
- .collect();
-
- Ok(DiagnosticResult {
- all_diagnostics,
- uri_redaction,
- })
-}
-
-macro_rules! assert_symbols {
- ($result:expr) => {
- let result = $result;
- assert_json_snapshot!(result.all_diagnostics, {
- ".$key" => result.uri_redaction
- });
- };
-}
-
-static BUILD_LOG_FIXTURE: &str = r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC
-%SRC \usepackage{amsmath}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \foo{}
-%SRC aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-%SRC
-%SRC \end{document}
-
-%LOG main.log
-%SRC This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX) (preloaded format=pdflatex 2022.1.23) 16 JUN 2022 11:04
-%SRC entering extended mode
-%SRC restricted \write18 enabled.
-%SRC %&-line parsing enabled.
-%SRC **main.tex
-%SRC (./main.tex
-%SRC LaTeX2e <2020-10-01> patch level 4
-%SRC L3 programming layer <2021-02-18>
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/base/article.cls
-%SRC Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/base/size10.clo
-%SRC File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
-%SRC )
-%SRC \c@part=\count179
-%SRC \c@section=\count180
-%SRC \c@subsection=\count181
-%SRC \c@subsubsection=\count182
-%SRC \c@paragraph=\count183
-%SRC \c@subparagraph=\count184
-%SRC \c@figure=\count185
-%SRC \c@table=\count186
-%SRC \abovecaptionskip=\skip47
-%SRC \belowcaptionskip=\skip48
-%SRC \bibindent=\dimen138
-%SRC )
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
-%SRC Package: amsmath 2020/09/23 v2.17i AMS math features
-%SRC \@mathmargin=\skip49
-%SRC
-%SRC For additional information on amsmath, use the `?' option.
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
-%SRC Package: amstext 2000/06/29 v2.01 AMS text
-%SRC
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
-%SRC File: amsgen.sty 1999/11/30 v2.0 generic functions
-%SRC \@emptytoks=\toks15
-%SRC \ex@=\dimen139
-%SRC ))
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
-%SRC Package: amsbsy 1999/11/29 v1.2d Bold Symbols
-%SRC \pmbraise@=\dimen140
-%SRC )
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
-%SRC Package: amsopn 2016/03/08 v2.02 operator names
-%SRC )
-%SRC \inf@bad=\count187
-%SRC LaTeX Info: Redefining \frac on input line 234.
-%SRC \uproot@=\count188
-%SRC \leftroot@=\count189
-%SRC LaTeX Info: Redefining \overline on input line 399.
-%SRC \classnum@=\count190
-%SRC \DOTSCASE@=\count191
-%SRC LaTeX Info: Redefining \ldots on input line 496.
-%SRC LaTeX Info: Redefining \dots on input line 499.
-%SRC LaTeX Info: Redefining \cdots on input line 620.
-%SRC \Mathstrutbox@=\box47
-%SRC \strutbox@=\box48
-%SRC \big@size=\dimen141
-%SRC LaTeX Font Info: Redeclaring font encoding OML on input line 743.
-%SRC LaTeX Font Info: Redeclaring font encoding OMS on input line 744.
-%SRC \macc@depth=\count192
-%SRC \c@MaxMatrixCols=\count193
-%SRC \dotsspace@=\muskip16
-%SRC \c@parentequation=\count194
-%SRC \dspbrk@lvl=\count195
-%SRC \tag@help=\toks16
-%SRC \row@=\count196
-%SRC \column@=\count197
-%SRC \maxfields@=\count198
-%SRC \andhelp@=\toks17
-%SRC \eqnshift@=\dimen142
-%SRC \alignsep@=\dimen143
-%SRC \tagshift@=\dimen144
-%SRC \tagwidth@=\dimen145
-%SRC \totwidth@=\dimen146
-%SRC \lineht@=\dimen147
-%SRC \@envbody=\toks18
-%SRC \multlinegap=\skip50
-%SRC \multlinetaggap=\skip51
-%SRC \mathdisplay@stack=\toks19
-%SRC LaTeX Info: Redefining \[ on input line 2923.
-%SRC LaTeX Info: Redefining \] on input line 2924.
-%SRC )
-%SRC (c:/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
-%SRC File: l3backend-pdftex.def 2021-03-18 L3 backend support: PDF output (pdfTeX)
-%SRC \l__color_backend_stack_int=\count199
-%SRC \l__pdf_internal_box=\box49
-%SRC )
-%SRC (./main.aux)
-%SRC \openout1 = `main.aux'.
-%SRC
-%SRC LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
-%SRC LaTeX Font Info: ... okay on input line 5.
-%SRC
-%SRC ! Undefined control sequence.
-%SRC l.7 \foo
-%SRC {}
-%SRC The control sequence at the end of the top line
-%SRC of your error message was never \def'ed. If you have
-%SRC misspelled it (e.g., `\hobx'), type `I' and the correct
-%SRC spelling (e.g., `I\hbox'). Otherwise just continue,
-%SRC and I'll forget about whatever was undefined.
-%SRC
-%SRC
-%SRC Overfull \hbox (80.00125pt too wide) in paragraph at lines 8--9
-%SRC []\OT1/cmr/m/n/10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-%SRC aaaaaaaaaaaaaaaaaaaaa
-%SRC []
-%SRC
-%SRC [1
-%SRC
-%SRC {c:/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./main.aux) )
-%SRC Here is how much of TeX's memory you used:
-%SRC 1014 strings out of 478994
-%SRC 13996 string characters out of 5862207
-%SRC 300924 words of memory out of 5000000
-%SRC 18565 multiletter control sequences out of 15000+600000
-%SRC 403430 words of font info for 27 fonts, out of 8000000 for 9000
-%SRC 1141 hyphenation exceptions out of 8191
-%SRC 67i,4n,74p,200b,104s stack positions out of 5000i,500n,10000p,200000b,80000s
-%SRC <
-%SRC c:/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
-%SRC Output written on main.pdf (1 page, 9741 bytes).
-%SRC PDF statistics:
-%SRC 12 PDF objects out of 1000 (max. 8388607)
-%SRC 7 compressed objects within 1 object stream
-%SRC 0 named destinations out of 1000 (max. 500000)
-%SRC 1 words of extra memory for PDF output out of 10000 (max. 10000000)"#;
-
-#[test]
-fn build_log_filter_none() -> Result<()> {
- assert_symbols!(find_diagnostics(BUILD_LOG_FIXTURE, serde_json::json!({}))?);
- Ok(())
-}
-
-#[test]
-fn build_log_filter_allowed() -> Result<()> {
- assert_symbols!(find_diagnostics(
- BUILD_LOG_FIXTURE,
- serde_json::json!({
- "diagnostics": {
- "allowedPatterns": ["Overfull \\\\[hv]box"]
- }
- })
- )?);
-
- Ok(())
-}
-
-#[test]
-fn build_log_filter_ignored() -> Result<()> {
- assert_symbols!(find_diagnostics(
- BUILD_LOG_FIXTURE,
- serde_json::json!({
- "diagnostics": {
- "ignoredPatterns": ["Overfull \\\\[hv]box"]
- }
- })
- )?);
-
- Ok(())
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/references.rs b/support/texlab/tests/integration/lsp/text_document/references.rs
deleted file mode 100644
index ff272673dd..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/references.rs
+++ /dev/null
@@ -1,275 +0,0 @@
-use anyhow::Result;
-use assert_unordered::assert_eq_unordered;
-use lsp_types::{
- request::References, ClientCapabilities, Location, ReferenceContext, ReferenceParams,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str, context: ReferenceContext) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let mut expected_locations = Vec::new();
- for ranges in fixture.ranges.values() {
- expected_locations.push(Location::new(
- client.uri(ranges[&1].name)?,
- ranges[&1].range,
- ));
- }
-
- let actual_locations = client
- .request::<References>(ReferenceParams {
- text_document_position: fixture.cursor.unwrap().into_params(&client)?,
- context,
- partial_result_params: Default::default(),
- work_done_progress_params: Default::default(),
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- assert_eq_unordered!(actual_locations, expected_locations);
- Ok(())
-}
-
-#[test]
-fn entry_definition() -> Result<()> {
- check(
- r#"
-%BIB foo.bib
-%SRC @article{foo,}
-%CUR ^
-
-%TEX bar.tex
-%SRC \cite{foo}
-%1.1 ^^^
-%SRC \addbibresource{foo.bib}
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn entry_definition_include_decl() -> Result<()> {
- check(
- r#"
-%BIB foo.bib
-%SRC @article{foo,}
-%CUR ^
-%2.1 ^^^
-
-%TEX bar.tex
-%SRC \cite{foo}
-%1.1 ^^^
-%SRC \addbibresource{foo.bib}
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
-
-#[test]
-fn entry_reference() -> Result<()> {
- check(
- r#"
-%BIB foo.bib
-%SRC @article{foo,}
-
-%TEX bar.tex
-%SRC \cite{foo}
-%CUR ^
-%1.1 ^^^
-%SRC \addbibresource{foo.bib}
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn entry_reference_include_decl() -> Result<()> {
- check(
- r#"
-%BIB foo.bib
-%SRC @article{foo,}
-%2.1 ^^^
-
-%TEX bar.tex
-%SRC \cite{foo}
-%CUR ^
-%1.1 ^^^
-%SRC \addbibresource{foo.bib}
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
-
-#[test]
-fn label_definition() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \label{foo}
-%CUR ^
-
-%TEX bar.tex
-%SRC \ref{foo}
-%1.1 ^^^
-%SRC \input{foo.tex}
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn label_definition_include_decl() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \label{foo}
-%CUR ^
-%2.1 ^^^
-
-%TEX bar.tex
-%SRC \ref{foo}
-%1.1 ^^^
-%SRC \input{foo.tex}
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
-
-#[test]
-fn label_reference() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \label{foo}
-%SRC \input{bar.tex}
-
-%TEX bar.tex
-%SRC \ref{foo}
-%CUR ^
-%1.1 ^^^
-
-%TEX baz.tex
-%SRC \ref{foo}
-%2.1 ^^^
-%SRC \input{bar.tex}
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn label_reference_include_decl() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \label{foo}
-%3.1 ^^^
-%SRC \input{bar.tex}
-
-%TEX bar.tex
-%SRC \ref{foo}
-%CUR ^
-%1.1 ^^^
-
-%TEX baz.tex
-%SRC \ref{foo}
-%2.1 ^^^
-%SRC \input{bar.tex}
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
-
-#[test]
-fn string_reference() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {Foo}}
-%SRC @string{bar = {Bar}}
-%SRC @article{baz, author = foo}
-%CUR ^
-%1.1 ^^^
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn string_reference_include_decl() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {Foo}}
-%2.1 ^^^
-%SRC @string{bar = {Bar}}
-%SRC @article{baz, author = foo}
-%CUR ^
-%1.1 ^^^
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
-
-#[test]
-fn string_definition() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {Foo}}
-%CUR ^
-%SRC @string{bar = {Bar}}
-%SRC @article{baz, author = foo}
-%1.1 ^^^
-"#,
- ReferenceContext {
- include_declaration: false,
- },
- )
-}
-
-#[test]
-fn string_definition_include_decl() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @string{foo = {Foo}}
-%CUR ^
-%2.1 ^^^
-%SRC @string{bar = {Bar}}
-%SRC @article{baz, author = foo}
-%1.1 ^^^
-"#,
- ReferenceContext {
- include_declaration: true,
- },
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/rename.rs b/support/texlab/tests/integration/lsp/text_document/rename.rs
deleted file mode 100644
index 6b5a7e4978..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/rename.rs
+++ /dev/null
@@ -1,111 +0,0 @@
-use std::collections::HashMap;
-
-use anyhow::Result;
-use lsp_types::{request::Rename, ClientCapabilities, RenameParams, TextEdit, Url, WorkspaceEdit};
-
-use crate::lsp::{client::Client, fixture};
-
-fn check(fixture: &str, new_name: &str) -> Result<()> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let mut expected_changes: HashMap<Url, Vec<TextEdit>> = HashMap::new();
- for ranges in fixture.ranges.values() {
- expected_changes
- .entry(client.uri(ranges[&1].name)?)
- .or_default()
- .push(TextEdit::new(ranges[&1].range, new_name.to_string()));
- }
-
- let actual_edit = client
- .request::<Rename>(RenameParams {
- text_document_position: fixture.cursor.unwrap().into_params(&client)?,
- new_name: new_name.to_string(),
- work_done_progress_params: Default::default(),
- })?
- .unwrap_or_default();
-
- client.shutdown()?;
-
- assert_eq!(actual_edit, WorkspaceEdit::new(expected_changes));
- Ok(())
-}
-
-#[test]
-fn command() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \baz
-%CUR ^
-%1.1 ^^^
-%SRC \include{bar.tex}
-
-%TEX bar.tex
-%SRC \baz
-%2.1 ^^^
-"#,
- "qux",
- )
-}
-
-#[test]
-fn entry() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = baz}
-%CUR ^
-%1.1 ^^^
-
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{foo}
-%2.1 ^^^
-"#,
- "qux",
- )
-}
-
-#[test]
-fn citation() -> Result<()> {
- check(
- r#"
-%BIB main.bib
-%SRC @article{foo, bar = baz}
-%1.1 ^^^
-
-%TEX main.tex
-%SRC \addbibresource{main.bib}
-%SRC \cite{foo}
-%CUR ^
-%2.1 ^^^
-"#,
- "qux",
- )
-}
-
-#[test]
-fn label() -> Result<()> {
- check(
- r#"
-%TEX foo.tex
-%SRC \label{foo}\include{bar}
-%CUR ^
-%1.1 ^^^
-
-%TEX bar.tex
-%SRC \ref{foo}
-%2.1 ^^^
-
-%TEX baz.tex
-%SRC \ref{foo}
-"#,
- "bar",
- )
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_empty.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_empty.snap
deleted file mode 100644
index 33c5b459e1..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_empty.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 89
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n%SRC \\acrshort{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "fpsLabel",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fpsLabel"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_open_brace.snap
deleted file mode 100644
index 41a71b7951..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_open_brace.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 117
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n%SRC \\acrshort{f\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "fpsLabel",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fpsLabel"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_simple.snap
deleted file mode 100644
index 3d31151a72..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__acronym_ref_simple.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 75
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n%SRC \\acrshort{f}\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "fpsLabel",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fpsLabel"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_empty.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_empty.snap
deleted file mode 100644
index 41c438baf6..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_empty.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 159
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{amsfonts}\n%SRC \\mathbb{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "A",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "A"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "B",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "B"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "C",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "C"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "D",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "D"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "E",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "E"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_open_brace.snap
deleted file mode 100644
index 7009557720..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_open_brace.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 186
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{amsfonts}\n%SRC \\mathbb{\n%CUR ^\n%SRC Test\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "A",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "A"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "B",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "B"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "C",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "C"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "D",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "D"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "E",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "E"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_word.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_word.snap
deleted file mode 100644
index 2ea7a4649d..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__argument_word.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 172
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{amsfonts}\n%SRC \\mathbb{A}\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "A",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "A"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__begin_environment_without_snippet_support.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__begin_environment_without_snippet_support.snap
deleted file mode 100644
index 468ea3ea5f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__begin_environment_without_snippet_support.snap
+++ /dev/null
@@ -1,68 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 215
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\beg\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "begin",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "begin"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "begingroup",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "begingroup"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "AtBeginDocument",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "AtBeginDocument"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "AtBeginDvi",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "AtBeginDvi"
- }
- },
- {
- "data": "[data]",
- "detail": "â‹€, built-in",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "bigwedge",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "bigwedge"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation.snap
deleted file mode 100644
index 517df0a0df..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation.snap
+++ /dev/null
@@ -1,32 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 228
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\documentclass{article}\n%SRC \\bibliography{main}\n%SRC \\begin{document}\n%SRC \\cite{\n%CUR ^\n%SRC \\end{document}\n\n%BIB main.bib\n%SRC @article{foo:2019,\n%SRC author = {Foo Bar},\n%SRC title = {Baz Qux},\n%SRC year = {2019},\n%SRC }\n%SRC \n%SRC @article{bar:2005,}\"#)?"
----
-[
- {
- "data": "[data]",
- "filterText": "bar:2005 @article bar:2005",
- "kind": 1,
- "label": "bar:2005",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "bar:2005"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "filterText": "foo:2019 @article foo:2019 author Foo Bar title Baz Qux year 2019",
- "kind": 1,
- "label": "foo:2019",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foo:2019"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_acronym.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_acronym.snap
deleted file mode 100644
index a679c4c42b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_acronym.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 286
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\addbibresource{main.bib}\n%SRC \\DeclareAcronym{foo}{cite={}}\n%CUR ^\n\n%BIB main.bib\n%SRC @article{foo,}\"#)?"
----
-[
- {
- "data": "[data]",
- "filterText": "foo @article foo",
- "kind": 1,
- "label": "foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foo"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace.snap
deleted file mode 100644
index cf2056b7e7..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 253
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\addbibresource{main.bib}\n%SRC \\cite{\n%CUR ^\n\n%BIB main.bib\n%SRC @article{foo,}\"#)?"
----
-[
- {
- "data": "[data]",
- "filterText": "foo @article foo",
- "kind": 1,
- "label": "foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foo"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace_multiple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace_multiple.snap
deleted file mode 100644
index 7619c22002..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__citation_open_brace_multiple.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 269
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\addbibresource{main.bib}\n%SRC \\cite{foo,a\n%CUR ^\n%1.1 ^\n\n%BIB main.bib\n%SRC @article{foo,}\"#)?"
----
-[
- {
- "data": "[data]",
- "filterText": "foo @article foo",
- "kind": 1,
- "label": "foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foo"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_open_brace.snap
deleted file mode 100644
index 651c6e4f36..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_open_brace.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 334
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\definecolor{foo}{\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "HTML",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "HTML"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RGB",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RGB"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "cmyk",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "cmyk"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "gray",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "gray"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "rgb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "rgb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_open_brace.snap
deleted file mode 100644
index 4fb23233c9..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_open_brace.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 358
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\definecolorset{\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "HTML",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "HTML"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RGB",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RGB"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "cmyk",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "cmyk"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "gray",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "gray"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "rgb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "rgb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_simple.snap
deleted file mode 100644
index 4b7f137e4f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_set_simple.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 346
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\definecolorset{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "HTML",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "HTML"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RGB",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RGB"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "cmyk",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "cmyk"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "gray",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "gray"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "rgb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "rgb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_simple.snap
deleted file mode 100644
index a160c859c3..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_model_definition_simple.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 322
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\definecolor{foo}{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "HTML",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "HTML"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RGB",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RGB"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "cmyk",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "cmyk"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "gray",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "gray"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "rgb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "rgb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_open_brace.snap
deleted file mode 100644
index df57a6e6ef..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_open_brace.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 395
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\color{\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "Apricot",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Apricot"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Aquamarine",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Aquamarine"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Bittersweet",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Bittersweet"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Black",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Black"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Blue",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Blue"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_simple.snap
deleted file mode 100644
index fb4e2bee73..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_simple.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 370
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\color{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "Apricot",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Apricot"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Aquamarine",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Aquamarine"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Bittersweet",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Bittersweet"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Black",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Black"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Blue",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Blue"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_word.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_word.snap
deleted file mode 100644
index b730f14a42..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__color_word.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 382
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\color{re}\n%CUR ^\n%1.1 ^^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "red",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "red"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "Red",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "Red"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RedOrange",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RedOrange"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "RedViolet",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "RedViolet"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "BrickRed",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "BrickRed"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_bibtex.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_bibtex.snap
deleted file mode 100644
index 545a13af3c..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_bibtex.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 446
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{b, \n%SRC c = {\\LaT }\n%CUR ^\n%1.1 ^^^\n%SRC }\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "LaTeX",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LaTeX"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "LaTeXe",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LaTeXe"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "latexreleaseversion",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "latexreleaseversion"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "LastDeclaredEncoding",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LastDeclaredEncoding"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "last",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "last"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple.snap
deleted file mode 100644
index 8414866ca1..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple.snap
+++ /dev/null
@@ -1,69 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 407
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "!",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "!"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "\"",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "\""
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "#",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "#"
- }
- },
- {
- "data": "[data]",
- "detail": "$, built-in",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "$",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "$"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "%",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "%"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple_package.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple_package.snap
deleted file mode 100644
index c08f480f7e..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_command_simple_package.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 432
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{lipsum}\n%SRC \\lips\n%CUR ^\n%1.1 ^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "lipsum.sty",
- "kind": 1,
- "label": "lipsum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lipsum"
- }
- },
- {
- "data": "[data]",
- "detail": "lipsum.sty",
- "kind": 1,
- "label": "lipsumexp",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lipsumexp"
- }
- },
- {
- "data": "[data]",
- "detail": "lipsum.sty",
- "kind": 1,
- "label": "LipsumPar",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LipsumPar"
- }
- },
- {
- "data": "[data]",
- "detail": "lipsum.sty",
- "kind": 1,
- "label": "LipsumProtect",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LipsumProtect"
- }
- },
- {
- "data": "[data]",
- "detail": "lipsum.sty",
- "kind": 1,
- "label": "LipsumRestoreAll",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "LipsumRestoreAll"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_class.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_class.snap
deleted file mode 100644
index ff16b8e7b6..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_class.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 487
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\documentclass{article}\n%SRC \\begin{thein}\n%CUR ^\n%1.1 ^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "article.cls",
- "kind": 1,
- "label": "theindex",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "theindex"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_command_definition.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_command_definition.snap
deleted file mode 100644
index e07204dd14..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_command_definition.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 501
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newcommand{\\foo}{\\begin{doc}\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "document",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "document"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple.snap
deleted file mode 100644
index 6c3be2426e..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 461
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\begin{doc\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "document",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "document"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple_end.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple_end.snap
deleted file mode 100644
index af0e4ca762..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__component_environment_simple_end.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 474
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\begin{document}\n%SRC \\end{\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "document",
- "preselect": true,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "document"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "abstract",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "abstract"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "array",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "array"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "center",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "center"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "csname",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "csname"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_preamble.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_preamble.snap
deleted file mode 100644
index 281254f2b8..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_preamble.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 565
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @preamble{\n%CUR ^\n%1.1 ^^^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "preamble",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "preamble"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_string.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_string.snap
deleted file mode 100644
index 706bd78d07..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_after_string.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 578
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @string{\n%CUR ^\n%1.1 ^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "string",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "string"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_at_empty.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_at_empty.snap
deleted file mode 100644
index 19d2a451af..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_at_empty.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 514
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "article",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "article"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "artwork",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "artwork"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "audio",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "audio"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "bibnote",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "bibnote"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "book",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "book"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_article.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_article.snap
deleted file mode 100644
index 654258a594..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_article.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 552
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article\n%CUR ^\n%1.1 ^^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "article",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "article"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_preamble.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_preamble.snap
deleted file mode 100644
index 6a4a79f14d..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_preamble.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 526
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @preamble\n%CUR ^\n%1.1 ^^^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "preamble",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "preamble"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_string.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_string.snap
deleted file mode 100644
index b3b6f2928b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_before_string.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 539
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @string\n%CUR ^\n%1.1 ^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "string",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "string"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_complete_entry.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_complete_entry.snap
deleted file mode 100644
index 2a18a34789..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__entry_type_complete_entry.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 591
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo, author = {foo}}\n%CUR ^\n%1.1 ^^^^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "article",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "article"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_closed.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_closed.snap
deleted file mode 100644
index 10f3b1d89a..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_closed.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 616
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo,}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "abstract",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "abstract"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "addendum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "addendum"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "address",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "address"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "afterword",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "afterword"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "annotation",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "annotation"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_open.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_open.snap
deleted file mode 100644
index bb8b03efda..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_empty_entry_open.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 604
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo,\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "abstract",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "abstract"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "addendum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "addendum"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "address",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "address"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "afterword",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "afterword"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "annotation",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "annotation"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_field_name.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_field_name.snap
deleted file mode 100644
index 32f1df6369..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_field_name.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 628
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo, a\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "abstract",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "abstract"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "addendum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "addendum"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "address",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "address"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "afterword",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "afterword"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "annotation",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "annotation"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_closed.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_closed.snap
deleted file mode 100644
index e1c61bab4c..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_closed.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 654
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo, author = bar, edit}\n%CUR ^\n%1.1 ^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "edition",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "edition"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editor",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editor"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editora",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editora"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editoratype",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editoratype"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editorb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editorb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_open.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_open.snap
deleted file mode 100644
index b86d4e96b0..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__field_entry_two_fields_name_open.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 641
-expression: "complete(r#\"\n%BIB main.bib\n%SRC @article{foo, author = bar, edit\n%CUR ^\n%1.1 ^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "edition",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "edition"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editor",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editor"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editora",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editora"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editoratype",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editoratype"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "editorb",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "editorb"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_open_brace.snap
deleted file mode 100644
index 25c90c0a4e..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_open_brace.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 145
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n%SRC \\gls{f\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "fpsLabel",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fpsLabel"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_simple.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_simple.snap
deleted file mode 100644
index a9c8bc5478..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__glossary_ref_simple.snap
+++ /dev/null
@@ -1,18 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 131
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}\n%SRC \\gls{f}\n%CUR ^\n%1.1 ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "fpsLabel",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fpsLabel"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_closed_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_closed_brace.snap
deleted file mode 100644
index 1b15dff00b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_closed_brace.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 706
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\documentclass{art}\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "article",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "article"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "articleingud",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "articleingud"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "articoletteracdp",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "articoletteracdp"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "artikel1",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "artikel1"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "artikel2",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "artikel2"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_open_brace.snap
deleted file mode 100644
index 4118d60707..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_class_open_brace.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 693
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\documentclass{art \\foo\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "article",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "article"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "articleingud",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "articleingud"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "articoletteracdp",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "articoletteracdp"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "artikel1",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "artikel1"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "artikel2",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "artikel2"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_closed_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_closed_brace.snap
deleted file mode 100644
index 141441047f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_closed_brace.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 680
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{lips}\n%CUR ^\n%1.1 ^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lips",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lips"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lipsum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lipsum"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lisp-simple-alloc",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lisp-simple-alloc"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lisp-string",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lisp-string"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lwarp-lips",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lwarp-lips"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_open_brace.snap
deleted file mode 100644
index c188633107..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__import_package_open_brace.snap
+++ /dev/null
@@ -1,67 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 667
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepackage{lips\n%CUR ^\n%1.1 ^^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lips",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lips"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lipsum",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lipsum"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lisp-simple-alloc",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lisp-simple-alloc"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lisp-string",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lisp-string"
- }
- },
- {
- "data": "[data]",
- "documentation": "[documentation]",
- "kind": 1,
- "label": "lwarp-lips",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lwarp-lips"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__label.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__label.snap
deleted file mode 100644
index e30dd28ab9..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__label.snap
+++ /dev/null
@@ -1,73 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 719
-expression: "complete(r#\"\n%TEX foo.tex\n%SRC \\documentclass{article}\n%SRC \n%SRC \\usepackage{amsmath}\n%SRC \\usepackage{caption}\n%SRC \\usepackage{amsthm}\n%SRC \\newtheorem{lemma}{Lemma}\n%SRC \n%SRC \\begin{document}\n%SRC \n%SRC \\section{Foo}%\n%SRC \\label{sec:foo}\n%SRC \n%SRC \\begin{equation}%\n%SRC \\label{eq:foo}\n%SRC 1 + 1 = 2\n%SRC \\end{equation}\n%SRC \n%SRC \\begin{equation}%\n%SRC \\label{eq:bar}\n%SRC 1 + 1 = 2\n%SRC \\end{equation}\n%SRC \n%SRC \\begin{figure}%\n%SRC \\LaTeX{}\n%SRC \\caption{Baz}%\n%SRC \\label{fig:baz}\n%SRC \\end{figure}\n%SRC \n%SRC \\begin{lemma}%\n%SRC \\label{thm:foo}\n%SRC 1 + 1 = 2\n%SRC \\end{lemma}\n%SRC \n%SRC \\include{bar}\n%SRC \n%SRC \\end{document}\n\n%TEX bar.tex\n%SRC \\section{Bar}%\n%SRC \\label{sec:bar}\n%SRC \n%SRC Lorem ipsum dolor sit amet.\n%SRC \\ref{}\n%CUR ^\n\n%TEX foo.aux\n%SRC \\relax\n%SRC \\@writefile{lof}{\\contentsline {figure}{\\numberline {1}{\\ignorespaces Baz\\relax }}{1}\\protected@file@percent }\n%SRC \\providecommand*\\caption@xref[2]{\\@setref\\relax\\@undefined{#1}}\n%SRC \\newlabel{fig:baz}{{1}{1}}\n%SRC \\@writefile{toc}{\\contentsline {section}{\\numberline {1}Foo}{1}\\protected@file@percent }\n%SRC \\newlabel{sec:foo}{{1}{1}}\n%SRC \\newlabel{eq:foo}{{1}{1}}\n%SRC \\newlabel{eq:bar}{{2}{1}}\n%SRC \\newlabel{thm:foo}{{1}{1}}\n%SRC \\@input{bar.aux}\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "Equation (2)",
- "filterText": "eq:bar Equation (2)",
- "kind": 1,
- "label": "eq:bar",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "eq:bar"
- }
- },
- {
- "data": "[data]",
- "detail": "Equation (1)",
- "filterText": "eq:foo Equation (1)",
- "kind": 1,
- "label": "eq:foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "eq:foo"
- }
- },
- {
- "data": "[data]",
- "detail": "Figure 1",
- "documentation": "[documentation]",
- "filterText": "fig:baz Figure 1: Baz",
- "kind": 1,
- "label": "fig:baz",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "fig:baz"
- }
- },
- {
- "data": "[data]",
- "detail": "Section (Bar)",
- "filterText": "sec:bar Section (Bar)",
- "kind": 1,
- "label": "sec:bar",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "sec:bar"
- }
- },
- {
- "data": "[data]",
- "detail": "Section 1 (Foo)",
- "filterText": "sec:foo Section 1 (Foo)",
- "kind": 1,
- "label": "sec:foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "sec:foo"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_begin.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_begin.snap
deleted file mode 100644
index b6964fe89c..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_begin.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 785
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newtheorem{lemma}{Lemma}\n%SRC \\begin{lem \n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "user-defined",
- "kind": 1,
- "label": "lemma",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lemma"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_end.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_end.snap
deleted file mode 100644
index 60fdc37edb..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__theorem_end.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 799
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\newtheorem{lemma}{Lemma}\n%SRC \\begin{}\n%SRC \\end{lem\n%CUR ^\n%1.1 ^^^\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "user-defined",
- "kind": 1,
- "label": "lemma",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "lemma"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_closed_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_closed_brace.snap
deleted file mode 100644
index a1d7354f8f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_closed_brace.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 826
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepgflibrary{}\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows.meta",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows.meta"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows.spaced",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows.spaced"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "curvilinear",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "curvilinear"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "datavisualization.barcharts",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "datavisualization.barcharts"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_open_brace.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_open_brace.snap
deleted file mode 100644
index 3c8a7a4b79..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__tikz_library_open_brace.snap
+++ /dev/null
@@ -1,62 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 814
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\usepgflibrary{\n%CUR ^\"#)?"
----
-[
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows.meta",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows.meta"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "arrows.spaced",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "arrows.spaced"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "curvilinear",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "curvilinear"
- }
- },
- {
- "data": "[data]",
- "kind": 1,
- "label": "datavisualization.barcharts",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "datavisualization.barcharts"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_command.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_command.snap
deleted file mode 100644
index c5c6b741f3..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_command.snap
+++ /dev/null
@@ -1,19 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 838
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\foobar\n%SRC \\fooba\n%CUR ^\n%1.1 ^^^^^\n%SRC \\begin{foo}\n%SRC \\end{foo}\n%SRC \\begin{fo}\n\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "user-defined",
- "kind": 1,
- "label": "foobar",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foobar"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_environment.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_environment.snap
deleted file mode 100644
index d760617880..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__completion__user_environment.snap
+++ /dev/null
@@ -1,31 +0,0 @@
----
-source: tests/integration/lsp/text_document/completion.rs
-assertion_line: 856
-expression: "complete(r#\"\n%TEX main.tex\n%SRC \\foobar\n%SRC \\fooba\n%SRC \\begin{foo}\n%SRC \\end{foo}\n%SRC \\begin{fo}\n%CUR ^\n%1.1 ^^\n\"#)?"
----
-[
- {
- "data": "[data]",
- "detail": "user-defined",
- "kind": 1,
- "label": "foo",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "foo"
- }
- },
- {
- "data": "[data]",
- "detail": "built-in",
- "kind": 1,
- "label": "filecontents",
- "preselect": false,
- "sortText": "[sortText]",
- "textEdit": {
- "range": "[range]",
- "newText": "filecontents"
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__did_change_configuration__invalid_configuration.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__did_change_configuration__invalid_configuration.snap
deleted file mode 100644
index 4f41cfbeb2..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__did_change_configuration__invalid_configuration.snap
+++ /dev/null
@@ -1,10 +0,0 @@
----
-source: tests/integration/lsp/text_document/did_change_configuration.rs
-assertion_line: 37
-expression: message
----
-The texlab configuration is invalid; using the default settings instead.
-Details: regex parse error:
- \
- ^
-error: incomplete escape sequence, reached end of pattern prematurely
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_flat.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_flat.snap
deleted file mode 100644
index 3293d55600..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_flat.snap
+++ /dev/null
@@ -1,97 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 88
-expression: result.response
----
-[
- {
- "name": "Enumerate",
- "kind": 10,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 9,
- "character": 15
- }
- }
- }
- },
- {
- "name": "Item",
- "kind": 22,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 5,
- "character": 4
- },
- "end": {
- "line": 5,
- "character": 27
- }
- }
- }
- },
- {
- "name": "Item",
- "kind": 22,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 6,
- "character": 4
- },
- "end": {
- "line": 6,
- "character": 27
- }
- }
- }
- },
- {
- "name": "Baz",
- "kind": 22,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 7,
- "character": 4
- },
- "end": {
- "line": 7,
- "character": 18
- }
- }
- }
- },
- {
- "name": "Qux",
- "kind": 22,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 8,
- "character": 4
- },
- "end": {
- "line": 8,
- "character": 32
- }
- }
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_nested.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_nested.snap
deleted file mode 100644
index b2753ba69f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__enumerate_nested.snap
+++ /dev/null
@@ -1,141 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 53
-expression: result.response
----
-[
- {
- "name": "Enumerate",
- "kind": 10,
- "deprecated": false,
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 9,
- "character": 15
- }
- },
- "selectionRange": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 9,
- "character": 15
- }
- },
- "children": [
- {
- "name": "Item",
- "detail": "it:foo",
- "kind": 22,
- "deprecated": false,
- "range": {
- "start": {
- "line": 5,
- "character": 4
- },
- "end": {
- "line": 5,
- "character": 27
- }
- },
- "selectionRange": {
- "start": {
- "line": 5,
- "character": 9
- },
- "end": {
- "line": 5,
- "character": 23
- }
- },
- "children": []
- },
- {
- "name": "Item",
- "detail": "it:bar",
- "kind": 22,
- "deprecated": false,
- "range": {
- "start": {
- "line": 6,
- "character": 4
- },
- "end": {
- "line": 6,
- "character": 27
- }
- },
- "selectionRange": {
- "start": {
- "line": 6,
- "character": 9
- },
- "end": {
- "line": 6,
- "character": 23
- }
- },
- "children": []
- },
- {
- "name": "Baz",
- "kind": 22,
- "deprecated": false,
- "range": {
- "start": {
- "line": 7,
- "character": 4
- },
- "end": {
- "line": 7,
- "character": 18
- }
- },
- "selectionRange": {
- "start": {
- "line": 7,
- "character": 4
- },
- "end": {
- "line": 7,
- "character": 18
- }
- },
- "children": []
- },
- {
- "name": "Qux",
- "detail": "it:qux",
- "kind": 22,
- "deprecated": false,
- "range": {
- "start": {
- "line": 8,
- "character": 4
- },
- "end": {
- "line": 8,
- "character": 32
- }
- },
- "selectionRange": {
- "start": {
- "line": 8,
- "character": 14
- },
- "end": {
- "line": 8,
- "character": 28
- }
- },
- "children": []
- }
- ]
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_flat.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_flat.snap
deleted file mode 100644
index b1a4630dab..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_flat.snap
+++ /dev/null
@@ -1,61 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 156
-expression: result.response
----
-[
- {
- "name": "Equation",
- "kind": 14,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 6,
- "character": 14
- }
- }
- }
- },
- {
- "name": "Equation",
- "kind": 14,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 8,
- "character": 0
- },
- "end": {
- "line": 10,
- "character": 14
- }
- }
- }
- },
- {
- "name": "Equation",
- "kind": 14,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 12,
- "character": 0
- },
- "end": {
- "line": 14,
- "character": 14
- }
- }
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_nested.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_nested.snap
deleted file mode 100644
index fc707bd031..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__equation_nested.snap
+++ /dev/null
@@ -1,87 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 117
-expression: result.response
----
-[
- {
- "name": "Equation",
- "detail": "eq:foo",
- "kind": 14,
- "deprecated": false,
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 6,
- "character": 14
- }
- },
- "selectionRange": {
- "start": {
- "line": 4,
- "character": 16
- },
- "end": {
- "line": 4,
- "character": 30
- }
- },
- "children": []
- },
- {
- "name": "Equation",
- "detail": "eq:bar",
- "kind": 14,
- "deprecated": false,
- "range": {
- "start": {
- "line": 8,
- "character": 0
- },
- "end": {
- "line": 10,
- "character": 14
- }
- },
- "selectionRange": {
- "start": {
- "line": 8,
- "character": 16
- },
- "end": {
- "line": 8,
- "character": 30
- }
- },
- "children": []
- },
- {
- "name": "Equation",
- "kind": 14,
- "deprecated": false,
- "range": {
- "start": {
- "line": 12,
- "character": 0
- },
- "end": {
- "line": 14,
- "character": 14
- }
- },
- "selectionRange": {
- "start": {
- "line": 12,
- "character": 0
- },
- "end": {
- "line": 14,
- "character": 14
- }
- },
- "children": []
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_flat.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_flat.snap
deleted file mode 100644
index da456f914e..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_flat.snap
+++ /dev/null
@@ -1,61 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 238
-expression: result.response
----
-[
- {
- "name": "Figure: Foo",
- "kind": 6,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 7,
- "character": 12
- }
- }
- }
- },
- {
- "name": "Figure: Bar",
- "kind": 6,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 9,
- "character": 0
- },
- "end": {
- "line": 12,
- "character": 12
- }
- }
- }
- },
- {
- "name": "Figure: Baz",
- "kind": 6,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 14,
- "character": 0
- },
- "end": {
- "line": 17,
- "character": 12
- }
- }
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_nested.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_nested.snap
deleted file mode 100644
index 4f60c21c92..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__float_nested.snap
+++ /dev/null
@@ -1,87 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 189
-expression: result.response
----
-[
- {
- "name": "Figure: Foo",
- "detail": "fig:foo",
- "kind": 6,
- "deprecated": false,
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 7,
- "character": 12
- }
- },
- "selectionRange": {
- "start": {
- "line": 6,
- "character": 17
- },
- "end": {
- "line": 6,
- "character": 32
- }
- },
- "children": []
- },
- {
- "name": "Figure: Bar",
- "detail": "fig:bar",
- "kind": 6,
- "deprecated": false,
- "range": {
- "start": {
- "line": 9,
- "character": 0
- },
- "end": {
- "line": 12,
- "character": 12
- }
- },
- "selectionRange": {
- "start": {
- "line": 11,
- "character": 17
- },
- "end": {
- "line": 11,
- "character": 32
- }
- },
- "children": []
- },
- {
- "name": "Figure: Baz",
- "kind": 6,
- "deprecated": false,
- "range": {
- "start": {
- "line": 14,
- "character": 0
- },
- "end": {
- "line": 17,
- "character": 12
- }
- },
- "selectionRange": {
- "start": {
- "line": 14,
- "character": 0
- },
- "end": {
- "line": 17,
- "character": 12
- }
- },
- "children": []
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_flat.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_flat.snap
deleted file mode 100644
index 85e72e90e1..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_flat.snap
+++ /dev/null
@@ -1,61 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 316
-expression: result.response
----
-[
- {
- "name": "Foo",
- "kind": 2,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 4,
- "character": 13
- }
- }
- }
- },
- {
- "name": "Bar",
- "kind": 2,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 31
- }
- }
- }
- },
- {
- "name": "Baz",
- "kind": 2,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 8,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 31
- }
- }
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_nested.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_nested.snap
deleted file mode 100644
index 97ae75eac4..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__section_nested.snap
+++ /dev/null
@@ -1,88 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 281
-expression: result.response
----
-[
- {
- "name": "Foo",
- "kind": 2,
- "deprecated": false,
- "range": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 4,
- "character": 13
- }
- },
- "selectionRange": {
- "start": {
- "line": 4,
- "character": 0
- },
- "end": {
- "line": 4,
- "character": 13
- }
- },
- "children": []
- },
- {
- "name": "Bar",
- "detail": "sec:bar",
- "kind": 2,
- "deprecated": false,
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 31
- }
- },
- "selectionRange": {
- "start": {
- "line": 6,
- "character": 13
- },
- "end": {
- "line": 6,
- "character": 28
- }
- },
- "children": [
- {
- "name": "Baz",
- "detail": "sec:baz",
- "kind": 2,
- "deprecated": false,
- "range": {
- "start": {
- "line": 8,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 31
- }
- },
- "selectionRange": {
- "start": {
- "line": 8,
- "character": 16
- },
- "end": {
- "line": 8,
- "character": 31
- }
- },
- "children": []
- }
- ]
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_flat.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_flat.snap
deleted file mode 100644
index 9af601da0d..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_flat.snap
+++ /dev/null
@@ -1,79 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 391
-expression: result.response
----
-[
- {
- "name": "Lemma (Foo)",
- "kind": 13,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 11
- }
- }
- }
- },
- {
- "name": "Lemma",
- "kind": 13,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 10,
- "character": 0
- },
- "end": {
- "line": 12,
- "character": 11
- }
- }
- }
- },
- {
- "name": "Lemma",
- "kind": 13,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 14,
- "character": 0
- },
- "end": {
- "line": 16,
- "character": 11
- }
- }
- }
- },
- {
- "name": "Lemma (Qux)",
- "kind": 13,
- "deprecated": false,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 18,
- "character": 0
- },
- "end": {
- "line": 20,
- "character": 11
- }
- }
- }
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_nested.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_nested.snap
deleted file mode 100644
index 6a81f96fa6..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__document_symbol__theorem_nested.snap
+++ /dev/null
@@ -1,114 +0,0 @@
----
-source: tests/integration/lsp/text_document/document_symbol.rs
-assertion_line: 345
-expression: result.response
----
-[
- {
- "name": "Lemma (Foo)",
- "detail": "thm:foo",
- "kind": 13,
- "deprecated": false,
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 8,
- "character": 11
- }
- },
- "selectionRange": {
- "start": {
- "line": 6,
- "character": 18
- },
- "end": {
- "line": 6,
- "character": 33
- }
- },
- "children": []
- },
- {
- "name": "Lemma",
- "detail": "thm:bar",
- "kind": 13,
- "deprecated": false,
- "range": {
- "start": {
- "line": 10,
- "character": 0
- },
- "end": {
- "line": 12,
- "character": 11
- }
- },
- "selectionRange": {
- "start": {
- "line": 10,
- "character": 13
- },
- "end": {
- "line": 10,
- "character": 28
- }
- },
- "children": []
- },
- {
- "name": "Lemma",
- "detail": "thm:baz",
- "kind": 13,
- "deprecated": false,
- "range": {
- "start": {
- "line": 14,
- "character": 0
- },
- "end": {
- "line": 16,
- "character": 11
- }
- },
- "selectionRange": {
- "start": {
- "line": 14,
- "character": 13
- },
- "end": {
- "line": 14,
- "character": 28
- }
- },
- "children": []
- },
- {
- "name": "Lemma (Qux)",
- "kind": 13,
- "deprecated": false,
- "range": {
- "start": {
- "line": 18,
- "character": 0
- },
- "end": {
- "line": 20,
- "character": 11
- }
- },
- "selectionRange": {
- "start": {
- "line": 18,
- "character": 0
- },
- "end": {
- "line": 20,
- "character": 11
- }
- },
- "children": []
- }
-]
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_command.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_command.snap
deleted file mode 100644
index 1add9efc6a..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_command.snap
+++ /dev/null
@@ -1,9 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 96
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = \"\\baz\",}\"#)?"
----
-@article{foo,
- bar = "\baz",
-}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_insert_braces.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_insert_braces.snap
deleted file mode 100644
index ee9be8c822..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_insert_braces.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 85
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = baz,\"#)?"
----
-@article{foo,
- bar = baz,
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_join_strings.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_join_strings.snap
deleted file mode 100644
index 8c2a21f579..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_join_strings.snap
+++ /dev/null
@@ -1,9 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 107
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = \"baz\" # \"qux\"}\"#)?"
----
-@article{foo,
- bar = "baz" # "qux",
-}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_multiple_entries.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_multiple_entries.snap
deleted file mode 100644
index cf228db867..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_multiple_entries.snap
+++ /dev/null
@@ -1,17 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 59
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, \n%SRC consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.},}\n%SRC \n%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, \n%SRC 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.},
-}
-
-@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/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_parens.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_parens.snap
deleted file mode 100644
index 58e98f7ba5..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_parens.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 118
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article(foo,)\"#)?"
----
-@article{foo,
-}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_preamble.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_preamble.snap
deleted file mode 100644
index a82706dbf6..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_preamble.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 140
-expression: "format(r#\"\n%BIB main.bib\n%SRC @preamble{\n%SRC \"foo bar baz\" }\"#)?"
----
-@preamble{"foo bar baz"}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_string.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_string.snap
deleted file mode 100644
index 3234fca52c..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_string.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 129
-expression: "format(r#\"\n%BIB main.bib\n%SRC @string{foo=\"bar\"}\"#)?"
----
-@string{foo = "bar"}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_trailing_comma.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_trailing_comma.snap
deleted file mode 100644
index 1231f1795f..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_trailing_comma.snap
+++ /dev/null
@@ -1,9 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 74
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = baz}\"#)?"
----
-@article{foo,
- bar = baz,
-}
-
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap
deleted file mode 100644
index fd9355025c..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap
+++ /dev/null
@@ -1,11 +0,0 @@
----
-source: tests/integration/lsp/text_document/formatting.rs
-assertion_line: 46
-expression: "format(r#\"\n%BIB main.bib\n%SRC @article{foo, bar = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n%SRC Lorem ipsum dolor sit amet,\n%SRC 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/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_allowed.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_allowed.snap
deleted file mode 100644
index 9fc11d295b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_allowed.snap
+++ /dev/null
@@ -1,24 +0,0 @@
----
-source: tests/integration/lsp/text_document/publish_diagnostics.rs
-assertion_line: 240
-expression: result.all_diagnostics
----
-{
- "[tmp]/main.tex": [
- {
- "range": {
- "start": {
- "line": 7,
- "character": 0
- },
- "end": {
- "line": 7,
- "character": 0
- }
- },
- "severity": 2,
- "source": "latex-build",
- "message": "Overfull \\hbox (80.00125pt too wide) in paragraph at lines 8--9"
- }
- ]
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_ignored.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_ignored.snap
deleted file mode 100644
index 28e0308a72..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_ignored.snap
+++ /dev/null
@@ -1,24 +0,0 @@
----
-source: tests/integration/lsp/text_document/publish_diagnostics.rs
-assertion_line: 254
-expression: result.all_diagnostics
----
-{
- "[tmp]/main.tex": [
- {
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 6,
- "character": 0
- }
- },
- "severity": 1,
- "source": "latex-build",
- "message": "Undefined control sequence."
- }
- ]
-}
diff --git a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_none.snap b/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_none.snap
deleted file mode 100644
index b16238381b..0000000000
--- a/support/texlab/tests/integration/lsp/text_document/snapshots/integration__lsp__text_document__publish_diagnostics__build_log_filter_none.snap
+++ /dev/null
@@ -1,39 +0,0 @@
----
-source: tests/integration/lsp/text_document/publish_diagnostics.rs
-assertion_line: 234
-expression: result.all_diagnostics
----
-{
- "[tmp]/main.tex": [
- {
- "range": {
- "start": {
- "line": 6,
- "character": 0
- },
- "end": {
- "line": 6,
- "character": 0
- }
- },
- "severity": 1,
- "source": "latex-build",
- "message": "Undefined control sequence."
- },
- {
- "range": {
- "start": {
- "line": 7,
- "character": 0
- },
- "end": {
- "line": 7,
- "character": 0
- }
- },
- "severity": 2,
- "source": "latex-build",
- "message": "Overfull \\hbox (80.00125pt too wide) in paragraph at lines 8--9"
- }
- ]
-}
diff --git a/support/texlab/tests/integration/lsp/workspace.rs b/support/texlab/tests/integration/lsp/workspace.rs
deleted file mode 100644
index 15e0679dea..0000000000
--- a/support/texlab/tests/integration/lsp/workspace.rs
+++ /dev/null
@@ -1 +0,0 @@
-mod symbol;
diff --git a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_bibtex.snap b/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_bibtex.snap
deleted file mode 100644
index 8b71b0519e..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_bibtex.snap
+++ /dev/null
@@ -1,43 +0,0 @@
----
-source: tests/integration/lsp/workspace/symbol.rs
-assertion_line: 145
-expression: result.actual_symbols
----
-[
- {
- "deprecated": false,
- "kind": 24,
- "location": {
- "uri": "[tmp]/main.bib",
- "range": {
- "start": {
- "line": 0,
- "character": 0
- },
- "end": {
- "line": 0,
- "character": 14
- }
- }
- },
- "name": "foo"
- },
- {
- "deprecated": false,
- "kind": 15,
- "location": {
- "uri": "[tmp]/main.bib",
- "range": {
- "start": {
- "line": 2,
- "character": 0
- },
- "end": {
- "line": 2,
- "character": 20
- }
- }
- },
- "name": "bar"
- }
-]
diff --git a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_figure.snap b/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_figure.snap
deleted file mode 100644
index a2343d994b..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_figure.snap
+++ /dev/null
@@ -1,25 +0,0 @@
----
-source: tests/integration/lsp/workspace/symbol.rs
-assertion_line: 127
-expression: result.actual_symbols
----
-[
- {
- "deprecated": false,
- "kind": 6,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 15,
- "character": 0
- },
- "end": {
- "line": 19,
- "character": 12
- }
- }
- },
- "name": "Figure 1: Bar"
- }
-]
diff --git a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_item.snap b/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_item.snap
deleted file mode 100644
index 37dad570c9..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_item.snap
+++ /dev/null
@@ -1,61 +0,0 @@
----
-source: tests/integration/lsp/workspace/symbol.rs
-assertion_line: 133
-expression: result.actual_symbols
----
-[
- {
- "deprecated": false,
- "kind": 22,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 24,
- "character": 4
- },
- "end": {
- "line": 24,
- "character": 28
- }
- }
- },
- "name": "1"
- },
- {
- "deprecated": false,
- "kind": 22,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 25,
- "character": 4
- },
- "end": {
- "line": 25,
- "character": 28
- }
- }
- },
- "name": "2"
- },
- {
- "deprecated": false,
- "kind": 22,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 26,
- "character": 4
- },
- "end": {
- "line": 26,
- "character": 28
- }
- }
- },
- "name": "3"
- }
-]
diff --git a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_math.snap b/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_math.snap
deleted file mode 100644
index 8b98b614a3..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_math.snap
+++ /dev/null
@@ -1,43 +0,0 @@
----
-source: tests/integration/lsp/workspace/symbol.rs
-assertion_line: 139
-expression: result.actual_symbols
----
-[
- {
- "deprecated": false,
- "kind": 14,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 9,
- "character": 0
- },
- "end": {
- "line": 11,
- "character": 14
- }
- }
- },
- "name": "Equation (1)"
- },
- {
- "deprecated": false,
- "kind": 13,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 33,
- "character": 0
- },
- "end": {
- "line": 35,
- "character": 11
- }
- }
- },
- "name": "Lemma 1 (Qux)"
- }
-]
diff --git a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_section.snap b/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_section.snap
deleted file mode 100644
index b4974c9d7f..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/snapshots/integration__lsp__workspace__symbol__filter_type_section.snap
+++ /dev/null
@@ -1,79 +0,0 @@
----
-source: tests/integration/lsp/workspace/symbol.rs
-assertion_line: 121
-expression: result.actual_symbols
----
-[
- {
- "deprecated": false,
- "kind": 2,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 7,
- "character": 0
- },
- "end": {
- "line": 11,
- "character": 14
- }
- }
- },
- "name": "1 Foo"
- },
- {
- "deprecated": false,
- "kind": 2,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 13,
- "character": 0
- },
- "end": {
- "line": 19,
- "character": 12
- }
- }
- },
- "name": "2 Bar"
- },
- {
- "deprecated": false,
- "kind": 2,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 21,
- "character": 0
- },
- "end": {
- "line": 27,
- "character": 15
- }
- }
- },
- "name": "3 Baz"
- },
- {
- "deprecated": false,
- "kind": 2,
- "location": {
- "uri": "[tmp]/main.tex",
- "range": {
- "start": {
- "line": 29,
- "character": 0
- },
- "end": {
- "line": 35,
- "character": 11
- }
- }
- },
- "name": "4 Qux"
- }
-]
diff --git a/support/texlab/tests/integration/lsp/workspace/symbol.rs b/support/texlab/tests/integration/lsp/workspace/symbol.rs
deleted file mode 100644
index 0af7534af3..0000000000
--- a/support/texlab/tests/integration/lsp/workspace/symbol.rs
+++ /dev/null
@@ -1,147 +0,0 @@
-use anyhow::Result;
-use insta::{assert_json_snapshot, internals::Redaction};
-use lsp_types::{
- request::WorkspaceSymbol, ClientCapabilities, SymbolInformation, Url, WorkspaceSymbolParams,
-};
-
-use crate::lsp::{client::Client, fixture};
-
-struct SymbolResult {
- actual_symbols: Vec<SymbolInformation>,
- uri_redaction: Redaction,
-}
-
-fn find_symbols(fixture: &str, query: &str) -> Result<SymbolResult> {
- let mut client = Client::spawn()?;
- client.initialize(ClientCapabilities::default(), None)?;
-
- let fixture = fixture::parse(fixture);
- for file in fixture.files {
- client.open(file.name, file.lang, file.text)?;
- }
-
- let actual_symbols = client
- .request::<WorkspaceSymbol>(WorkspaceSymbolParams {
- query: query.to_string(),
- work_done_progress_params: Default::default(),
- partial_result_params: Default::default(),
- })?
- .unwrap_or_default();
-
- let result = client.shutdown()?;
-
- let uri = Url::from_directory_path(result.directory.path()).unwrap();
- let uri_redaction = insta::dynamic_redaction(move |content, _path| {
- content.as_str().unwrap().replace(uri.as_str(), "[tmp]/")
- });
-
- Ok(SymbolResult {
- actual_symbols,
- uri_redaction,
- })
-}
-
-macro_rules! assert_symbols {
- ($result:expr) => {
- let result = $result;
- assert_json_snapshot!(result.actual_symbols, {
- "[].location.uri" => result.uri_redaction,
- "[]" => insta::sorted_redaction()
- });
- };
-}
-
-const FIXTURE: &str = r#"
-%TEX main.tex
-%SRC \documentclass{article}
-%SRC \usepackage{caption}
-%SRC \usepackage{amsmath}
-%SRC \usepackage{amsthm}
-%SRC
-%SRC \begin{document}
-%SRC
-%SRC \section{Foo}\label{sec:foo}
-%SRC
-%SRC \begin{equation}\label{eq:foo}
-%SRC Foo
-%SRC \end{equation}
-%SRC
-%SRC \section{Bar}\label{sec:bar}
-%SRC
-%SRC \begin{figure}
-%SRC Bar
-%SRC \caption{Bar}
-%SRC \label{fig:bar}
-%SRC \end{figure}
-%SRC
-%SRC \section{Baz}\label{sec:baz}
-%SRC
-%SRC \begin{enumerate}
-%SRC \item\label{itm:foo} Foo
-%SRC \item\label{itm:bar} Bar
-%SRC \item\label{itm:baz} Baz
-%SRC \end{enumerate}
-%SRC
-%SRC \section{Qux}\label{sec:qux}
-%SRC
-%SRC \newtheorem{lemma}{Lemma}
-%SRC
-%SRC \begin{lemma}[Qux]\label{thm:qux}
-%SRC Qux
-%SRC \end{lemma}
-%SRC
-%SRC \end{document}
-
-%TEX main.aux
-%SRC \relax
-%SRC \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Bar\relax }}{1}\protected@file@percent }
-%SRC \providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
-%SRC \newlabel{fig:bar}{{1}{1}}
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
-%SRC \newlabel{sec:foo}{{1}{1}}
-%SRC \newlabel{eq:foo}{{1}{1}}
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{1}\protected@file@percent }
-%SRC \newlabel{sec:bar}{{2}{1}}
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {3}Baz}{1}\protected@file@percent }
-%SRC \newlabel{sec:baz}{{3}{1}}
-%SRC \newlabel{itm:foo}{{1}{1}}
-%SRC \newlabel{itm:bar}{{2}{1}}
-%SRC \newlabel{itm:baz}{{3}{1}}
-%SRC \@writefile{toc}{\contentsline {section}{\numberline {4}Qux}{1}\protected@file@percent }
-%SRC \newlabel{sec:qux}{{4}{1}}
-%SRC \newlabel{thm:qux}{{1}{1}}
-
-%BIB main.bib
-%SRC @article{foo,}
-%SRC
-%SRC @string{bar = "bar"}"#;
-
-#[test]
-fn filter_type_section() -> Result<()> {
- assert_symbols!(find_symbols(FIXTURE, "section")?);
- Ok(())
-}
-
-#[test]
-fn filter_type_figure() -> Result<()> {
- assert_symbols!(find_symbols(FIXTURE, "figure")?);
- Ok(())
-}
-
-#[test]
-fn filter_type_item() -> Result<()> {
- assert_symbols!(find_symbols(FIXTURE, "item")?);
- Ok(())
-}
-
-#[test]
-fn filter_type_math() -> Result<()> {
- assert_symbols!(find_symbols(FIXTURE, "math")?);
- Ok(())
-}
-
-#[test]
-fn filter_bibtex() -> Result<()> {
- assert_symbols!(find_symbols(FIXTURE, "bibtex")?);
- Ok(())
-}
diff --git a/support/texlab/tests/integration/main.rs b/support/texlab/tests/integration/main.rs
deleted file mode 100644
index 44e0d3635a..0000000000
--- a/support/texlab/tests/integration/main.rs
+++ /dev/null
@@ -1 +0,0 @@
-mod lsp;