Files
rust/crates/ra_lsp_server/src/lib.rs

40 lines
926 B
Rust
Raw Normal View History

2019-11-22 10:33:08 +03:00
//! Implementation of the LSP for rust-analyzer.
//!
2019-11-27 21:32:33 +03:00
//! This crate takes Rust-specific analysis results from ra_ide and
2019-11-22 10:33:08 +03:00
//! translates into LSP types.
//!
//! It also is the root of all state. `world` module defines the bulk of the
//! state, and `main_loop` module defines the rules for modifying it.
2019-06-26 09:12:46 +03:00
#![recursion_limit = "512"]
2019-11-22 10:33:08 +03:00
#[allow(unused)]
macro_rules! println {
($($tt:tt)*) => {
compile_error!("stdout is locked, use eprintln")
};
}
#[allow(unused)]
macro_rules! print {
($($tt:tt)*) => {
compile_error!("stdout is locked, use eprint")
};
}
2018-09-01 18:16:08 +03:00
mod caps;
mod cargo_target_spec;
2018-09-01 18:16:08 +03:00
mod conv;
mod main_loop;
mod markdown;
pub mod req;
2019-10-11 15:13:15 -04:00
mod config;
2019-06-01 10:31:40 +03:00
mod world;
2018-09-01 18:16:08 +03:00
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
pub use crate::{
caps::server_capabilities,
config::ServerConfig,
main_loop::LspError,
main_loop::{main_loop, show_message},
};