2021-01-11 17:13:41 +00:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
2021-05-11 04:54:10 +00:00
|
|
|
|
2021-12-04 13:19:06 +00:00
|
|
|
// FIXME(bartlomieju): remove this attribute
|
|
|
|
#![allow(unused)]
|
|
|
|
|
2020-12-21 13:44:26 +00:00
|
|
|
use deno_core::error::AnyError;
|
|
|
|
use lspower::LspService;
|
|
|
|
use lspower::Server;
|
2020-12-07 10:46:39 +00:00
|
|
|
|
|
|
|
mod analysis;
|
2021-10-10 21:26:22 +00:00
|
|
|
mod cache;
|
2020-12-07 10:46:39 +00:00
|
|
|
mod capabilities;
|
2021-06-04 21:31:44 +00:00
|
|
|
mod code_lens;
|
2021-03-25 00:13:37 +00:00
|
|
|
mod completions;
|
2020-12-07 10:46:39 +00:00
|
|
|
mod config;
|
|
|
|
mod diagnostics;
|
2021-01-22 10:03:16 +00:00
|
|
|
mod documents;
|
2021-04-09 01:27:27 +00:00
|
|
|
pub(crate) mod language_server;
|
2021-06-01 11:53:08 +00:00
|
|
|
mod lsp_custom;
|
2021-06-17 23:57:58 +00:00
|
|
|
mod parent_process_checker;
|
2021-04-09 01:27:27 +00:00
|
|
|
mod path_to_regex;
|
2021-01-27 00:32:49 +00:00
|
|
|
mod performance;
|
2021-08-06 01:46:32 +00:00
|
|
|
mod refactor;
|
2021-04-09 01:27:27 +00:00
|
|
|
mod registries;
|
2021-04-20 01:26:36 +00:00
|
|
|
mod semantic_tokens;
|
2020-12-07 10:46:39 +00:00
|
|
|
mod text;
|
|
|
|
mod tsc;
|
2021-02-18 04:37:05 +00:00
|
|
|
mod urls;
|
2020-12-07 10:46:39 +00:00
|
|
|
|
2021-06-23 01:48:01 +00:00
|
|
|
pub async fn start() -> Result<(), AnyError> {
|
2020-12-21 13:44:26 +00:00
|
|
|
let stdin = tokio::io::stdin();
|
|
|
|
let stdout = tokio::io::stdout();
|
2020-12-07 10:46:39 +00:00
|
|
|
|
2020-12-21 13:44:26 +00:00
|
|
|
let (service, messages) =
|
|
|
|
LspService::new(language_server::LanguageServer::new);
|
|
|
|
Server::new(stdin, stdout)
|
|
|
|
.interleave(messages)
|
|
|
|
.serve(service)
|
|
|
|
.await;
|
2020-12-07 10:46:39 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|