aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/gen_lsp_server/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs
index 8e7697ed4..7ecef83cb 100644
--- a/crates/gen_lsp_server/src/lib.rs
+++ b/crates/gen_lsp_server/src/lib.rs
@@ -5,11 +5,12 @@
5//! Run with `RUST_LOG=gen_lsp_server=debug` to see all the messages. 5//! Run with `RUST_LOG=gen_lsp_server=debug` to see all the messages.
6//! 6//!
7//! ```no_run 7//! ```no_run
8//! use std::error::Error;
8//! use crossbeam_channel::{Sender, Receiver}; 9//! use crossbeam_channel::{Sender, Receiver};
9//! use lsp_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}}; 10//! use lsp_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}};
10//! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse}; 11//! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse};
11//! 12//!
12//! fn main() -> Result<(), failure::Error> { 13//! fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
13//! let (receiver, sender, io_threads) = stdio_transport(); 14//! let (receiver, sender, io_threads) = stdio_transport();
14//! run_server( 15//! run_server(
15//! ServerCapabilities::default(), 16//! ServerCapabilities::default(),
@@ -25,7 +26,7 @@
25//! _params: InitializeParams, 26//! _params: InitializeParams,
26//! receiver: &Receiver<RawMessage>, 27//! receiver: &Receiver<RawMessage>,
27//! sender: &Sender<RawMessage>, 28//! sender: &Sender<RawMessage>,
28//! ) -> Result<(), failure::Error> { 29//! ) -> Result<(), Box<dyn Error + Send + Sync>> {
29//! for msg in receiver { 30//! for msg in receiver {
30//! match msg { 31//! match msg {
31//! RawMessage::Request(req) => { 32//! RawMessage::Request(req) => {