mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-03 18:29:03 +00:00
Distinguish between format and output kind
This commit is contained in:
parent
6919c4ee29
commit
3064fb6531
6 changed files with 23 additions and 5 deletions
|
@ -26,6 +26,12 @@ impl Format {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub enum OutputKind {
|
||||
Dvi,
|
||||
Pdf,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CompileResult {
|
||||
pub log: String,
|
||||
|
|
|
@ -53,6 +53,13 @@ pub trait Distribution: Send + Sync {
|
|||
|
||||
fn supports_format(&self, format: Format) -> bool;
|
||||
|
||||
fn output_kind(&self, format: Format) -> OutputKind {
|
||||
match format {
|
||||
Format::Latex => OutputKind::Dvi,
|
||||
Format::Pdflatex | Format::Xelatex | Format::Lualatex => OutputKind::Pdf,
|
||||
}
|
||||
}
|
||||
|
||||
#[boxed]
|
||||
async fn compile<'a>(
|
||||
&'a self,
|
||||
|
|
|
@ -12,11 +12,15 @@ impl Distribution for Tectonic {
|
|||
|
||||
fn supports_format(&self, format: Format) -> bool {
|
||||
match format {
|
||||
Format::Latex | Format::Lualatex => false,
|
||||
Format::Pdflatex | Format::Xelatex => true,
|
||||
Format::Latex | Format::Pdflatex | Format::Xelatex => true,
|
||||
Format::Lualatex => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn output_kind(&self, _format: Format) -> OutputKind {
|
||||
OutputKind::Pdf
|
||||
}
|
||||
|
||||
#[boxed]
|
||||
async fn compile<'a>(
|
||||
&'a self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue