2020-06-02 03:57:01 +02:00
|
|
|
#![allow(unused)]
|
2020-09-19 16:16:00 +02:00
|
|
|
|
2020-10-16 05:29:22 +02:00
|
|
|
mod application;
|
2020-05-20 11:14:51 +02:00
|
|
|
|
2020-10-16 05:29:22 +02:00
|
|
|
use application::Application;
|
2020-05-20 11:14:51 +02:00
|
|
|
|
2020-10-01 05:23:07 +02:00
|
|
|
use clap::{App, Arg};
|
2020-06-02 03:57:01 +02:00
|
|
|
use std::path::PathBuf;
|
2020-05-20 11:14:51 +02:00
|
|
|
|
2020-05-25 06:02:21 +02:00
|
|
|
use anyhow::Error;
|
2020-05-20 11:14:51 +02:00
|
|
|
|
2020-09-04 11:18:40 +02:00
|
|
|
static EX: smol::Executor = smol::Executor::new();
|
|
|
|
|
2020-05-20 11:14:51 +02:00
|
|
|
fn main() -> Result<(), Error> {
|
2020-10-02 11:16:43 +02:00
|
|
|
let args = clap::app_from_crate!()
|
2020-10-01 05:23:07 +02:00
|
|
|
.arg(
|
|
|
|
Arg::new("files")
|
|
|
|
.about("Sets the input file to use")
|
|
|
|
.required(true)
|
|
|
|
.multiple(true)
|
|
|
|
.index(1),
|
|
|
|
)
|
|
|
|
.get_matches();
|
2020-05-20 11:14:51 +02:00
|
|
|
|
2020-09-04 11:18:40 +02:00
|
|
|
for _ in 0..num_cpus::get() {
|
|
|
|
std::thread::spawn(move || smol::block_on(EX.run(smol::future::pending::<()>())));
|
|
|
|
}
|
|
|
|
|
2020-10-20 06:58:34 +02:00
|
|
|
// let mut lsp = helix_lsp::Client::start(&EX, "rust-analyzer", &[]);
|
2020-10-18 11:01:06 +02:00
|
|
|
|
|
|
|
smol::block_on(async {
|
2020-10-20 06:58:34 +02:00
|
|
|
// let res = lsp.initialize().await;
|
|
|
|
// let state = helix_core::State::load("test.rs".into(), &[]).unwrap();
|
|
|
|
// let res = lsp.text_document_did_open(&state).await;
|
|
|
|
// loop {}
|
2020-10-19 09:09:44 +02:00
|
|
|
|
2020-10-20 06:58:34 +02:00
|
|
|
Application::new(args, &EX).unwrap().run().await;
|
2020-10-18 11:01:06 +02:00
|
|
|
});
|
2020-05-20 11:14:51 +02:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|