mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-03 18:29:03 +00:00
Refactor integration tests
This commit is contained in:
parent
c4d5b89287
commit
fe2d78c47c
181 changed files with 878 additions and 964 deletions
|
@ -1,8 +1,8 @@
|
|||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct BibtexEntryTypeCompletionProvider;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use super::combinators;
|
||||
use crate::factory::{self, LatexComponentId};
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::{CompletionItem, CompletionParams};
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexBeginCommandCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexCitationCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexColorCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::LANGUAGE_DATA;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexColorModelCompletionProvider;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use texlab_workspace::*;
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct Parameter<'a> {
|
||||
|
|
|
@ -53,7 +53,8 @@ impl FeatureProvider for LatexComponentEnvironmentCompletionProvider {
|
|||
combinators::environment(request, |context| {
|
||||
async move {
|
||||
let mut items = Vec::new();
|
||||
for component in COMPLETION_DATABASE.related_components(request.related_documents()) {
|
||||
for component in COMPLETION_DATABASE.related_components(request.related_documents())
|
||||
{
|
||||
let file_names = component.file_names.iter().map(AsRef::as_ref).collect();
|
||||
let id = LatexComponentId::Component(file_names);
|
||||
for environment in &component.environments {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::LatexGlossaryEntryKind::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexGlossaryCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct LatexClassImportProvider;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use std::path::{Path, PathBuf};
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::combinators::{self, ArgumentContext, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use std::sync::Arc;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexLabelCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators;
|
||||
use crate::factory::{self, LatexComponentId};
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexTheoremEnvironmentCompletionProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::combinators::{self, Parameter};
|
||||
use crate::factory;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::LANGUAGE_DATA;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexPgfLibraryCompletionProvider;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::combinators;
|
||||
use crate::factory::{self, LatexComponentId};
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use itertools::Itertools;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexUserCommandCompletionProvider;
|
||||
|
|
|
@ -24,11 +24,11 @@ use self::latex::tikz::*;
|
|||
use self::latex::user::*;
|
||||
use self::preselect::PreselectCompletionProvider;
|
||||
use self::quality::OrderByQualityCompletionProvider;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use itertools::Itertools;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use texlab_protocol::{CompletionItem, CompletionParams};
|
||||
use texlab_workspace::*;
|
||||
|
||||
pub const COMPLETION_LIMIT: usize = 50;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::{CompletionItem, CompletionParams};
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PreselectCompletionProvider<F> {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use std::borrow::Cow;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::{CompletionItem, CompletionParams, Position};
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
pub struct OrderByQualityCompletionProvider<F> {
|
||||
pub provider: F,
|
||||
|
|
|
@ -11,7 +11,6 @@ byteorder = "1"
|
|||
futures-boxed = { path = "../futures_boxed" }
|
||||
futures = "0.3"
|
||||
log = "0.4.6"
|
||||
once_cell = "1.2.0"
|
||||
tempfile = "3"
|
||||
tokio = { version = "0.2", features = ["fs", "process", "time"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
@ -11,11 +11,8 @@ pub use self::language::Language;
|
|||
use self::miktex::Miktex;
|
||||
use self::tectonic::Tectonic;
|
||||
use self::texlive::Texlive;
|
||||
use futures::lock::Mutex;
|
||||
use futures_boxed::boxed;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::collections::HashMap;
|
||||
use std::future::Future;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use tokio::process::Command;
|
||||
|
@ -150,25 +147,3 @@ impl Distribution for UnknownDistribution {
|
|||
Arc::new(Resolver::default())
|
||||
}
|
||||
}
|
||||
|
||||
static DISTRO: Lazy<Mutex<Option<Arc<Box<dyn Distribution>>>>> = Lazy::new(|| Mutex::new(None));
|
||||
|
||||
pub async fn with_distro<T, A, F>(supported_kinds: &[DistributionKind], action: A) -> Option<T>
|
||||
where
|
||||
A: FnOnce(Arc<Box<dyn Distribution>>) -> F,
|
||||
F: Future<Output = T>,
|
||||
{
|
||||
let distro = {
|
||||
let mut guard = DISTRO.lock().await;
|
||||
if guard.is_none() {
|
||||
*guard = Some(Arc::new(Distribution::detect().await));
|
||||
}
|
||||
Arc::clone(guard.as_ref().unwrap())
|
||||
};
|
||||
|
||||
if supported_kinds.contains(&distro.kind()) {
|
||||
Some(action(distro).await)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct BibtexEntryTypeHoverProvider;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct BibtexFieldHoverProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use texlab_citeproc::render_citation;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use log::warn;
|
||||
use texlab_citeproc::render_citation;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct LatexCitationHoverProvider;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct LatexIncludeHoverProvider;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use std::sync::Arc;
|
||||
use texlab_protocol::RangeExt;
|
||||
use texlab_protocol::*;
|
||||
use texlab_syntax::*;
|
||||
use texlab_workspace::*;
|
||||
|
||||
pub struct LatexLabelHoverProvider;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ use self::latex::component::LatexComponentHoverProvider;
|
|||
use self::latex::include::LatexIncludeHoverProvider;
|
||||
use self::latex::label::LatexLabelHoverProvider;
|
||||
use self::latex::preview::LatexPreviewHoverProvider;
|
||||
use texlab_workspace::*;
|
||||
use futures_boxed::boxed;
|
||||
use texlab_protocol::{Hover, TextDocumentPositionParams};
|
||||
use texlab_workspace::*;
|
||||
|
||||
pub struct HoverProvider {
|
||||
provider: ChoiceProvider<TextDocumentPositionParams, Hover>,
|
||||
|
|
21
crates/texlab_test/Cargo.toml
Normal file
21
crates/texlab_test/Cargo.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[package]
|
||||
name = "texlab-test"
|
||||
version = "0.1.0"
|
||||
authors = [
|
||||
"Eric Förster <efoerster@users.noreply.github.com>",
|
||||
"Patrick Förster <pfoerster@users.noreply.github.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
copy_dir = "0.1.2"
|
||||
futures = "0.3"
|
||||
futures-boxed = { path = "../futures_boxed" }
|
||||
jsonrpc = { path = "../jsonrpc" }
|
||||
once_cell = "1.2.0"
|
||||
serde = { version = "1.0.103", features = ["derive", "rc"] }
|
||||
serde_json = "1.0.44"
|
||||
tempfile = "3"
|
||||
texlab = { path = "../.." }
|
||||
texlab-distro = { path = "../texlab_distro" }
|
||||
texlab-protocol = { path = "../texlab_protocol" }
|
||||
tokio = { version = "0.2", features = ["fs", "process"] }
|
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\input{error_multiple_files_part.tex}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1 @@
|
|||
\foo{}
|
7
crates/texlab_test/scenarios/build/error_on_save.tex
Normal file
7
crates/texlab_test/scenarios/build/error_on_save.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\foo{}
|
||||
|
||||
\end{document}
|
7
crates/texlab_test/scenarios/build/error_single_file.tex
Normal file
7
crates/texlab_test/scenarios/build/error_single_file.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\foo{}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,5 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,5 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
\input{success_multiple_files_part.tex}
|
||||
\end{document}
|
|
@ -0,0 +1 @@
|
|||
$ e^{i \pi} + 1 = 0$
|
7
crates/texlab_test/scenarios/build/success_on_save.tex
Normal file
7
crates/texlab_test/scenarios/build/success_on_save.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Foo Bar Baz
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,8 @@
|
|||
\documentclass{article}
|
||||
\usepackage{amsmath}
|
||||
|
||||
\begin{document}
|
||||
|
||||
$ e^{i \pi} + 1 = 0$
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,7 @@
|
|||
@article{foo,
|
||||
author = {\LaT
|
||||
}
|
||||
|
||||
@article{foo,
|
||||
author = {\LaT}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
@article{foo,
|
||||
titl
|
||||
|
||||
@article{foo,
|
||||
title = {}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
@
|
||||
@art
|
||||
@article
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
@article{foo,
|
||||
author = {},
|
||||
}
|
||||
|
||||
@comment{foo,
|
||||
author = {},
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
@article{foo:2019,
|
||||
author = {Foo Bar},
|
||||
title = {Baz Qux},
|
||||
year = {2019},
|
||||
}
|
||||
|
||||
@article{bar:2005,}
|
|
@ -0,0 +1,8 @@
|
|||
\documentclass{article}
|
||||
\bibliography{bar}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\cite{
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,3 @@
|
|||
\color{re}
|
||||
\definecolor{foo}{
|
||||
\definecolorset{R}
|
|
@ -0,0 +1,8 @@
|
|||
\documentclass{book}
|
||||
\usepackage{amsmath}
|
||||
\chap
|
||||
\varDel
|
||||
\begin{theind}
|
||||
\end{alig}
|
||||
\begin{doc}
|
||||
\vareps
|
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\include{}
|
||||
\input{}
|
||||
\input{qux/}
|
||||
\addbibresource{}
|
||||
|
25
crates/texlab_test/scenarios/completion/latex/label/bar.aux
Normal file
25
crates/texlab_test/scenarios/completion/latex/label/bar.aux
Normal file
|
@ -0,0 +1,25 @@
|
|||
\relax
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{2}\protected@file@percent }
|
||||
\newlabel{sec:bar}{{2}{2}}
|
||||
\@setckpt{bar}{
|
||||
\setcounter{page}{3}
|
||||
\setcounter{equation}{2}
|
||||
\setcounter{enumi}{0}
|
||||
\setcounter{enumii}{0}
|
||||
\setcounter{enumiii}{0}
|
||||
\setcounter{enumiv}{0}
|
||||
\setcounter{footnote}{0}
|
||||
\setcounter{mpfootnote}{0}
|
||||
\setcounter{part}{0}
|
||||
\setcounter{section}{2}
|
||||
\setcounter{subsection}{0}
|
||||
\setcounter{subsubsection}{0}
|
||||
\setcounter{paragraph}{0}
|
||||
\setcounter{subparagraph}{0}
|
||||
\setcounter{figure}{1}
|
||||
\setcounter{table}{0}
|
||||
\setcounter{parentequation}{0}
|
||||
\setcounter{caption@flags}{0}
|
||||
\setcounter{ContinuedFloat}{0}
|
||||
\setcounter{lemma}{1}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
\section{Bar}%
|
||||
\label{sec:bar}
|
||||
|
||||
Lorem ipsum dolor sit amet.
|
||||
\ref{}
|
||||
\eqref{}
|
10
crates/texlab_test/scenarios/completion/latex/label/foo.aux
Normal file
10
crates/texlab_test/scenarios/completion/latex/label/foo.aux
Normal file
|
@ -0,0 +1,10 @@
|
|||
\relax
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Baz\relax }}{1}\protected@file@percent }
|
||||
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
|
||||
\newlabel{fig:baz}{{1}{1}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
|
||||
\newlabel{sec:foo}{{1}{1}}
|
||||
\newlabel{eq:foo}{{1}{1}}
|
||||
\newlabel{eq:bar}{{2}{1}}
|
||||
\newlabel{thm:foo}{{1}{1}}
|
||||
\@input{bar.aux}
|
36
crates/texlab_test/scenarios/completion/latex/label/foo.tex
Normal file
36
crates/texlab_test/scenarios/completion/latex/label/foo.tex
Normal file
|
@ -0,0 +1,36 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{amsmath}
|
||||
\usepackage{caption}
|
||||
\usepackage{amsthm}
|
||||
\newtheorem{lemma}{Lemma}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Foo}%
|
||||
\label{sec:foo}
|
||||
|
||||
\begin{equation}%
|
||||
\label{eq:foo}
|
||||
1 + 1 = 2
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}%
|
||||
\label{eq:bar}
|
||||
1 + 1 = 2
|
||||
\end{equation}
|
||||
|
||||
\begin{figure}%
|
||||
\LaTeX{}
|
||||
\caption{Baz}%
|
||||
\label{fig:baz}
|
||||
\end{figure}
|
||||
|
||||
\begin{lemma}%
|
||||
\label{thm:foo}
|
||||
1 + 1 = 2
|
||||
\end{lemma}
|
||||
|
||||
\include{bar}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,3 @@
|
|||
\begin{document}
|
||||
|
||||
\end{
|
|
@ -0,0 +1,5 @@
|
|||
\documentclass{article}
|
||||
\usepackage{amsthm}
|
||||
\newtheorem{foo}{Foo}
|
||||
|
||||
\begin{f}
|
|
@ -0,0 +1,3 @@
|
|||
\usepackage{tikz}
|
||||
\usepgflibrary{}
|
||||
\usetikzlibrary{}
|
|
@ -0,0 +1,5 @@
|
|||
\foo
|
||||
\fo
|
||||
\begin{foo}
|
||||
\end{foo}
|
||||
\begin{fo}
|
|
@ -0,0 +1,7 @@
|
|||
@string{foo = "Foo"}
|
||||
|
||||
@string{bar = "Bar"}
|
||||
|
||||
@article{baz,
|
||||
author = bar
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
@article{foo,}
|
||||
|
||||
@article{bar,}
|
|
@ -0,0 +1,3 @@
|
|||
@article{foo,}
|
||||
|
||||
@article{bar,}
|
|
@ -0,0 +1,2 @@
|
|||
\bibliography{bar}
|
||||
\cite{bar}
|
|
@ -0,0 +1,3 @@
|
|||
\newcommand{\foo}{Foo}
|
||||
|
||||
\foo
|
|
@ -0,0 +1,2 @@
|
|||
\label{foo}
|
||||
\ref{foo}
|
|
@ -0,0 +1,6 @@
|
|||
\begin{equation}%
|
||||
\label{eq:foo}
|
||||
Foo
|
||||
\end{equation}
|
||||
|
||||
\ref{eq:foo}
|
|
@ -0,0 +1,7 @@
|
|||
\begin{figure}
|
||||
Foo
|
||||
\caption{Bar}
|
||||
\label{fig}
|
||||
\end{figure}
|
||||
|
||||
\ref{fig}
|
|
@ -0,0 +1,7 @@
|
|||
\begin{enumerate}
|
||||
\item Foo
|
||||
\item\label{bar} Bar
|
||||
\item Baz
|
||||
\end{enumerate}
|
||||
|
||||
\ref{bar}
|
|
@ -0,0 +1,7 @@
|
|||
\section{Foo}
|
||||
\label{sec:foo}
|
||||
|
||||
\section{Bar}
|
||||
\label{sec:bar}
|
||||
|
||||
\ref{sec:foo}
|
|
@ -0,0 +1,9 @@
|
|||
\usepackage{amsthm}
|
||||
\newtheorem{lemma}{Lemma}
|
||||
|
||||
\begin{lemma}%
|
||||
\label{thm:foo}
|
||||
Foo
|
||||
\end{lemma}
|
||||
|
||||
\ref{thm:foo}
|
|
@ -0,0 +1,3 @@
|
|||
\DeclareMathOperator{\foo}{foo}
|
||||
|
||||
\foo
|
1
crates/texlab_test/scenarios/diagnostics/bibtex/foo.bib
Normal file
1
crates/texlab_test/scenarios/diagnostics/bibtex/foo.bib
Normal file
|
@ -0,0 +1 @@
|
|||
@article
|
59
crates/texlab_test/scenarios/diagnostics/build/foo.log
Normal file
59
crates/texlab_test/scenarios/diagnostics/build/foo.log
Normal file
|
@ -0,0 +1,59 @@
|
|||
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=latex 2019.4.26) 31 MAY 2019 17:55
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
%&-line parsing enabled.
|
||||
**foo.tex
|
||||
(./foo.tex
|
||||
LaTeX2e <2018-12-01>
|
||||
(/usr/share/texmf-dist/tex/latex/base/article.cls
|
||||
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
|
||||
(/usr/share/texmf-dist/tex/latex/base/size10.clo
|
||||
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
|
||||
)
|
||||
\c@part=\count80
|
||||
\c@section=\count81
|
||||
\c@subsection=\count82
|
||||
\c@subsubsection=\count83
|
||||
\c@paragraph=\count84
|
||||
\c@subparagraph=\count85
|
||||
\c@figure=\count86
|
||||
\c@table=\count87
|
||||
\abovecaptionskip=\skip41
|
||||
\belowcaptionskip=\skip42
|
||||
\bibindent=\dimen102
|
||||
) (./foo.aux)
|
||||
\openout1 = `foo.aux'.
|
||||
|
||||
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
|
||||
LaTeX Font Info: ... okay on input line 2.
|
||||
|
||||
! Undefined control sequence.
|
||||
l.4 \foo
|
||||
|
||||
The control sequence at the end of the top line
|
||||
of your error message was never \def'ed. If you have
|
||||
misspelled it (e.g., `\hobx'), type `I' and the correct
|
||||
spelling (e.g., `I\hbox'). Otherwise just continue,
|
||||
and I'll forget about whatever was undefined.
|
||||
|
||||
(./foo.aux) )
|
||||
Here is how much of TeX's memory you used:
|
||||
199 strings out of 492617
|
||||
2074 string characters out of 6135203
|
||||
59592 words of memory out of 5000000
|
||||
4199 multiletter control sequences out of 15000+600000
|
||||
3640 words of font info for 14 fonts, out of 8000000 for 9000
|
||||
1141 hyphenation exceptions out of 8191
|
||||
23i,1n,17p,127b,36s stack positions out of 5000i,500n,10000p,200000b,80000s
|
||||
|
||||
No pages of output.
|
6
crates/texlab_test/scenarios/diagnostics/build/foo.tex
Normal file
6
crates/texlab_test/scenarios/diagnostics/build/foo.tex
Normal file
|
@ -0,0 +1,6 @@
|
|||
\documentclass{article}
|
||||
\begin{document}
|
||||
|
||||
\foo
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1 @@
|
|||
\foo
|
|
@ -0,0 +1 @@
|
|||
\foo{}
|
|
@ -0,0 +1 @@
|
|||
\foo
|
|
@ -0,0 +1 @@
|
|||
\foo{}
|
24
crates/texlab_test/scenarios/folding/bar.bib
Normal file
24
crates/texlab_test/scenarios/folding/bar.bib
Normal file
|
@ -0,0 +1,24 @@
|
|||
@preamble{"Foo Bar Baz"}
|
||||
|
||||
@string{foo = "foo"}
|
||||
|
||||
@article{Rivest:1978:MOD:359340.359342,
|
||||
author = {Rivest, R. L. and Shamir, A. and Adleman, L.},
|
||||
title = {A Method for Obtaining Digital Signatures and Public-key Cryptosystems},
|
||||
journal = {Commun. ACM},
|
||||
issue_date = {Feb. 1978},
|
||||
volume = {21},
|
||||
number = {2},
|
||||
month = feb,
|
||||
year = {1978},
|
||||
issn = {0001-0782},
|
||||
pages = {120--126},
|
||||
numpages = {7},
|
||||
url = {http://doi.acm.org/10.1145/359340.359342},
|
||||
doi = {10.1145/359340.359342},
|
||||
acmid = {359342},
|
||||
publisher = {ACM},
|
||||
address = {New York, NY, USA},
|
||||
keywords = {authentication, cryptography, digital signatures, electronic funds transfer, electronic mail,
|
||||
factorization, message-passing, prime number, privacy, public-key cryptosystems, security},
|
||||
}
|
13
crates/texlab_test/scenarios/folding/foo.tex
Normal file
13
crates/texlab_test/scenarios/folding/foo.tex
Normal file
|
@ -0,0 +1,13 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{amsmath}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Foo}
|
||||
|
||||
\subsection{Bar}
|
||||
|
||||
\section{Baz}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,4 @@
|
|||
@article{foo,
|
||||
author = {Foo Bar},
|
||||
title = {Baz Qux},
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
@article{foo, author = {Foo Bar}, title = {Baz Qux}}
|
|
@ -0,0 +1,3 @@
|
|||
@article{foo,
|
||||
title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.},
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
@article{foo, title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.} }
|
4
crates/texlab_test/scenarios/hover/bibtex/field/foo.bib
Normal file
4
crates/texlab_test/scenarios/hover/bibtex/field/foo.bib
Normal file
|
@ -0,0 +1,4 @@
|
|||
@article{foo,
|
||||
author = {Foo Bar},
|
||||
bar = {Baz Qux},
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
@string{foo = "foo {bar} baz"}
|
||||
|
||||
@article{bar,
|
||||
author = foo # bar,
|
||||
title = "Qux",
|
||||
}
|
5
crates/texlab_test/scenarios/hover/bibtex/type/foo.bib
Normal file
5
crates/texlab_test/scenarios/hover/bibtex/type/foo.bib
Normal file
|
@ -0,0 +1,5 @@
|
|||
@article{foo,}
|
||||
|
||||
@bar{bar,}
|
||||
|
||||
@baz{baz,}
|
|
@ -0,0 +1,5 @@
|
|||
@article{foo, author = {Foo Bar}, title = {Baz Qux}, year = {2019}}
|
||||
|
||||
@article{bar, author = {Baz Qux}, title = {Foo Bar}, year = {2019}}
|
||||
|
||||
@article{baz,}
|
|
@ -0,0 +1,4 @@
|
|||
\bibliography{foo}
|
||||
|
||||
\cite{foo}
|
||||
\cite{baz}
|
|
@ -0,0 +1,4 @@
|
|||
\documentclass{article}
|
||||
\usepackage{amsmath}
|
||||
\documentclass{foo}
|
||||
\usepackage{foo}
|
|
@ -0,0 +1,5 @@
|
|||
\documentclass{article}
|
||||
\begin{document}
|
||||
\section{Foo}
|
||||
\label{sec:foo}
|
||||
\end{document}
|
|
@ -0,0 +1,3 @@
|
|||
\relax
|
||||
\newlabel{it:foo}{{1}{1}}
|
||||
\newlabel{it:qux}{{2}{1}}
|
|
@ -0,0 +1,12 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{enumerate}
|
||||
\item\label{it:foo} Foo
|
||||
\item\label{it:bar} Bar
|
||||
\item[Baz] Baz
|
||||
\item[Qux]\label{it:qux} Qux
|
||||
\end{enumerate}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,2 @@
|
|||
\relax
|
||||
\newlabel{eq:foo}{{1}{1}}
|
|
@ -0,0 +1,17 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{equation}\label{eq:foo}
|
||||
Foo
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}\label{eq:bar}
|
||||
Bar
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
Baz
|
||||
\end{equation}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,5 @@
|
|||
\relax
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Foo}}{1}\protected@file@percent }
|
||||
\newlabel{fig:foo}{{1}{1}}
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Bar}}{1}\protected@file@percent }
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Baz}}{1}\protected@file@percent }
|
24
crates/texlab_test/scenarios/symbol/hierarchical/float.tex
Normal file
24
crates/texlab_test/scenarios/symbol/hierarchical/float.tex
Normal file
|
@ -0,0 +1,24 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{figure}
|
||||
Foo
|
||||
\caption{Foo}\label{fig:foo}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
Bar
|
||||
\caption{Bar}\label{fig:bar}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
Baz
|
||||
\caption{Baz}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
Qux
|
||||
\end{figure}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,4 @@
|
|||
\relax
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{1}\protected@file@percent }
|
||||
\newlabel{sec:bar}{{2}{1}}
|
11
crates/texlab_test/scenarios/symbol/hierarchical/section.tex
Normal file
11
crates/texlab_test/scenarios/symbol/hierarchical/section.tex
Normal file
|
@ -0,0 +1,11 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Foo}
|
||||
|
||||
\section{Bar}\label{sec:bar}
|
||||
|
||||
\subsection{Baz}\label{sec:baz}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,3 @@
|
|||
\relax
|
||||
\newlabel{thm:foo}{{1}{1}}
|
||||
\newlabel{thm:bar}{{2}{1}}
|
23
crates/texlab_test/scenarios/symbol/hierarchical/theorem.tex
Normal file
23
crates/texlab_test/scenarios/symbol/hierarchical/theorem.tex
Normal file
|
@ -0,0 +1,23 @@
|
|||
\documentclass{article}
|
||||
\usepackage{amsthm}
|
||||
\newtheorem{lemma}{Lemma}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{lemma}[Foo]\label{thm:foo}
|
||||
Foo
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}\label{thm:bar}
|
||||
Bar
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}\label{thm:baz}
|
||||
Baz
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}[Qux]
|
||||
Qux
|
||||
\end{lemma}
|
||||
|
||||
\end{document}
|
3
crates/texlab_test/scenarios/symbol/workspace/bar.bib
Normal file
3
crates/texlab_test/scenarios/symbol/workspace/bar.bib
Normal file
|
@ -0,0 +1,3 @@
|
|||
@article{foo,}
|
||||
|
||||
@string{bar = "bar"}
|
17
crates/texlab_test/scenarios/symbol/workspace/foo.aux
Normal file
17
crates/texlab_test/scenarios/symbol/workspace/foo.aux
Normal file
|
@ -0,0 +1,17 @@
|
|||
\relax
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Bar\relax }}{1}\protected@file@percent }
|
||||
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
|
||||
\newlabel{fig:bar}{{1}{1}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1}Foo}{1}\protected@file@percent }
|
||||
\newlabel{sec:foo}{{1}{1}}
|
||||
\newlabel{eq:foo}{{1}{1}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2}Bar}{1}\protected@file@percent }
|
||||
\newlabel{sec:bar}{{2}{1}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3}Baz}{1}\protected@file@percent }
|
||||
\newlabel{sec:baz}{{3}{1}}
|
||||
\newlabel{itm:foo}{{1}{1}}
|
||||
\newlabel{itm:bar}{{2}{1}}
|
||||
\newlabel{itm:baz}{{3}{1}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4}Qux}{1}\protected@file@percent }
|
||||
\newlabel{sec:qux}{{4}{1}}
|
||||
\newlabel{thm:qux}{{1}{1}}
|
38
crates/texlab_test/scenarios/symbol/workspace/foo.tex
Normal file
38
crates/texlab_test/scenarios/symbol/workspace/foo.tex
Normal file
|
@ -0,0 +1,38 @@
|
|||
\documentclass{article}
|
||||
\usepackage{caption}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsthm}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Foo}\label{sec:foo}
|
||||
|
||||
\begin{equation}\label{eq:foo}
|
||||
Foo
|
||||
\end{equation}
|
||||
|
||||
\section{Bar}\label{sec:bar}
|
||||
|
||||
\begin{figure}
|
||||
Bar
|
||||
\caption{Bar}
|
||||
\label{fig:bar}
|
||||
\end{figure}
|
||||
|
||||
\section{Baz}\label{sec:baz}
|
||||
|
||||
\begin{enumerate}
|
||||
\item\label{itm:foo} Foo
|
||||
\item\label{itm:bar} Bar
|
||||
\item\label{itm:baz} Baz
|
||||
\end{enumerate}
|
||||
|
||||
\section{Qux}\label{sec:qux}
|
||||
|
||||
\newtheorem{lemma}{Lemma}
|
||||
|
||||
\begin{lemma}[Qux]\label{thm:qux}
|
||||
Qux
|
||||
\end{lemma}
|
||||
|
||||
\end{document}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue