mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 09:52:27 +00:00
feat: print version information when starting lsp server (#614)
This commit is contained in:
parent
f3ccb4a186
commit
58ff9ab846
3 changed files with 14 additions and 1 deletions
|
@ -21,5 +21,11 @@ fn main() -> Result<()> {
|
|||
.expect("Typst should be a dependency");
|
||||
|
||||
println!("cargo:rustc-env=TYPST_VERSION={}", typst.version);
|
||||
let src = typst
|
||||
.source
|
||||
.as_ref()
|
||||
.map(|e| e.repr.as_str())
|
||||
.unwrap_or_default();
|
||||
println!("cargo:rustc-env=TYPST_SOURCE={src}");
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -141,6 +141,7 @@ Commit Date: {}
|
|||
Commit Branch: {}
|
||||
Cargo Target Triple: {}
|
||||
Typst Version: {}
|
||||
Typst Source: {}
|
||||
",
|
||||
env!("VERGEN_BUILD_TIMESTAMP"),
|
||||
env!("VERGEN_GIT_DESCRIBE"),
|
||||
|
@ -149,5 +150,6 @@ Typst Version: {}
|
|||
option_env!("VERGEN_GIT_BRANCH").unwrap_or("None"),
|
||||
env!("VERGEN_CARGO_TARGET_TRIPLE"),
|
||||
env!("TYPST_VERSION"),
|
||||
env!("TYPST_SOURCE"),
|
||||
)
|
||||
});
|
||||
|
|
|
@ -93,7 +93,12 @@ pub fn completion(args: ShellCompletionArgs) -> anyhow::Result<()> {
|
|||
|
||||
/// The main entry point for the LSP server.
|
||||
pub fn lsp_main(args: LspArgs) -> anyhow::Result<()> {
|
||||
log::info!("starting LSP server: {:#?}", args);
|
||||
let pairs = LONG_VERSION.trim().split('\n');
|
||||
let pairs = pairs
|
||||
.map(|e| e.splitn(2, ":").map(|e| e.trim()).collect::<Vec<_>>())
|
||||
.collect::<Vec<_>>();
|
||||
log::info!("tinymist LSP version information: {pairs:?}");
|
||||
log::info!("starting LSP server: {args:#?}");
|
||||
|
||||
let is_replay = !args.mirror.replay.is_empty();
|
||||
with_stdio_transport(args.mirror.clone(), |conn| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue