mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Fully document ra_lsp_server
This commit is contained in:
parent
1f142d79ed
commit
4d307ff802
8 changed files with 20 additions and 11 deletions
|
@ -1,10 +1,14 @@
|
|||
//! FIXME: write short doc here
|
||||
//! See `CargoTargetSpec`
|
||||
|
||||
use ra_ide::{FileId, RunnableKind, TestId};
|
||||
use ra_project_model::{self, ProjectWorkspace, TargetKind};
|
||||
|
||||
use crate::{world::WorldSnapshot, Result};
|
||||
|
||||
/// Abstract representation of Cargo target.
|
||||
///
|
||||
/// We use it to cook up the set of cli args we need to pass to Cargo to
|
||||
/// build/test/run the target.
|
||||
pub(crate) struct CargoTargetSpec {
|
||||
pub(crate) package: String,
|
||||
pub(crate) target: String,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
//! Convenience module responsible for translating between rust-analyzer's types and LSP types.
|
||||
//! Convenience module responsible for translating between rust-analyzer's types
|
||||
//! and LSP types.
|
||||
|
||||
use lsp_types::{
|
||||
self, CreateFile, DiagnosticSeverity, DocumentChangeOperation, DocumentChanges, Documentation,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
//! Book keeping for keeping diagnostics easily in sync with the client.
|
||||
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use lsp_types::{CodeActionOrCommand, Diagnostic, Range};
|
||||
use ra_ide::FileId;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
pub type CheckFixes = Arc<HashMap<FileId, Vec<Fix>>>;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//! The main loop of `ra_lsp_server` responsible for dispatching LSP requests/replies and
|
||||
//! notifications back to the client.
|
||||
//! The main loop of `ra_lsp_server` responsible for dispatching LSP
|
||||
//! requests/replies and notifications back to the client.
|
||||
|
||||
mod handlers;
|
||||
mod subscriptions;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! This module is responsible for implementing handlers for Lanuage Server Protocol.
|
||||
//! The majority of requests are fulfilled by calling into the `ra_ide` crate.
|
||||
//! This module is responsible for implementing handlers for Language Server
|
||||
//! Protocol. The majority of requests are fulfilled by calling into the
|
||||
//! `ra_ide` crate.
|
||||
|
||||
use std::{
|
||||
collections::hash_map::Entry,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
//! Keeps track of file subscriptions.
|
||||
//! Keeps track of file subscriptions -- the set of currently opened files for
|
||||
//! which we want to publish diagnostics, syntax highlighting, etc.
|
||||
|
||||
use ra_ide::FileId;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//! The context or environment in which the language server functions.
|
||||
//! In our server implementation this is know as the `WorldState`.
|
||||
//! The context or environment in which the language server functions. In our
|
||||
//! server implementation this is know as the `WorldState`.
|
||||
//!
|
||||
//! Each tick provides an immutable snapshot of the state as `WorldSnapshot`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue