mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
organizize
This commit is contained in:
parent
26262aaf05
commit
7c67612b8a
376 changed files with 27 additions and 145 deletions
41
crates/server/src/req.rs
Normal file
41
crates/server/src/req.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
use languageserver_types::{TextDocumentIdentifier, Range};
|
||||
|
||||
pub use languageserver_types::{
|
||||
request::*, notification::*,
|
||||
InitializeResult,
|
||||
};
|
||||
|
||||
pub enum SyntaxTree {}
|
||||
|
||||
impl Request for SyntaxTree {
|
||||
type Params = SyntaxTreeParams;
|
||||
type Result = String;
|
||||
const METHOD: &'static str = "m/syntaxTree";
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SyntaxTreeParams {
|
||||
pub text_document: TextDocumentIdentifier
|
||||
}
|
||||
|
||||
pub enum ExtendSelection {}
|
||||
|
||||
impl Request for ExtendSelection {
|
||||
type Params = ExtendSelectionParams;
|
||||
type Result = ExtendSelectionResult;
|
||||
const METHOD: &'static str = "m/extendSelection";
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ExtendSelectionParams {
|
||||
pub text_document: TextDocumentIdentifier,
|
||||
pub selections: Vec<Range>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ExtendSelectionResult {
|
||||
pub selections: Vec<Range>,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue