mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
chore: change compile command to trace-lsp
(#447)
This commit is contained in:
parent
5b7794a587
commit
ede592796d
4 changed files with 7 additions and 6 deletions
|
@ -15,8 +15,9 @@ pub struct CliArguments {
|
|||
pub enum Commands {
|
||||
/// Run Language Server
|
||||
Lsp(LspArgs),
|
||||
/// Run Compile Server
|
||||
Compile(CompileArgs),
|
||||
/// Run Language Server for tracing some typst program.
|
||||
#[clap(hide(true))]
|
||||
TraceLsp(CompileArgs),
|
||||
/// Run Preview Server
|
||||
#[cfg(feature = "preview")]
|
||||
Preview(tinymist::tool::preview::PreviewCliArgs),
|
||||
|
|
|
@ -68,7 +68,7 @@ fn main() -> anyhow::Result<()> {
|
|||
|
||||
match args.command.unwrap_or_default() {
|
||||
Commands::Lsp(args) => lsp_main(args),
|
||||
Commands::Compile(args) => compiler_main(args),
|
||||
Commands::TraceLsp(args) => trace_main(args),
|
||||
#[cfg(feature = "preview")]
|
||||
Commands::Preview(args) => {
|
||||
#[cfg(feature = "preview")]
|
||||
|
@ -104,7 +104,7 @@ pub fn lsp_main(args: LspArgs) -> anyhow::Result<()> {
|
|||
}
|
||||
|
||||
/// The main entry point for the compiler.
|
||||
pub fn compiler_main(args: CompileArgs) -> anyhow::Result<()> {
|
||||
pub fn trace_main(args: CompileArgs) -> anyhow::Result<()> {
|
||||
let mut input = PathBuf::from(match args.compile.input {
|
||||
Some(value) => value,
|
||||
None => return Err(anyhow::Error::msg("Provide a valid path")),
|
||||
|
|
|
@ -39,7 +39,7 @@ async fn run_trace_program(params: TraceParams) -> anyhow::Result<TraceReport> {
|
|||
let mut cmd = tokio::process::Command::new(¶ms.compiler_program);
|
||||
let mut cmd = &mut cmd;
|
||||
|
||||
cmd = cmd.arg("compile");
|
||||
cmd = cmd.arg("trace-lsp");
|
||||
|
||||
cmd = cmd
|
||||
.arg("--root")
|
||||
|
|
|
@ -43,7 +43,7 @@ pub struct CompileFontArgs {
|
|||
/// Common arguments of compile, watch, and query.
|
||||
#[derive(Debug, Clone, Parser, Default)]
|
||||
pub struct CompileOnceArgs {
|
||||
/// Path to input Typst file, use `-` to read input from stdin
|
||||
/// Path to input Typst file
|
||||
#[clap(value_name = "INPUT")]
|
||||
pub input: Option<String>,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue