mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Use SelectionRange from LSP 3.15
This commit is contained in:
parent
6eab968c60
commit
429199d481
4 changed files with 13 additions and 33 deletions
|
@ -10,8 +10,9 @@ pub use lsp_types::{
|
|||
DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions,
|
||||
DocumentOnTypeFormattingParams, DocumentSymbolParams, DocumentSymbolResponse,
|
||||
FileSystemWatcher, Hover, InitializeResult, MessageType, PublishDiagnosticsParams,
|
||||
ReferenceParams, Registration, RegistrationParams, ShowMessageParams, SignatureHelp,
|
||||
TextDocumentEdit, TextDocumentPositionParams, TextEdit, WorkspaceEdit, WorkspaceSymbolParams,
|
||||
ReferenceParams, Registration, RegistrationParams, SelectionRange, SelectionRangeParams,
|
||||
ShowMessageParams, SignatureHelp, TextDocumentEdit, TextDocumentPositionParams, TextEdit,
|
||||
WorkspaceEdit, WorkspaceSymbolParams,
|
||||
};
|
||||
|
||||
pub enum AnalyzerStatus {}
|
||||
|
@ -67,28 +68,6 @@ pub struct ExpandMacroParams {
|
|||
pub position: Option<Position>,
|
||||
}
|
||||
|
||||
pub enum SelectionRangeRequest {}
|
||||
|
||||
impl Request for SelectionRangeRequest {
|
||||
type Params = SelectionRangeParams;
|
||||
type Result = Vec<SelectionRange>;
|
||||
const METHOD: &'static str = "textDocument/selectionRange";
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SelectionRangeParams {
|
||||
pub text_document: TextDocumentIdentifier,
|
||||
pub positions: Vec<Position>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SelectionRange {
|
||||
pub range: Range,
|
||||
pub parent: Option<Box<SelectionRange>>,
|
||||
}
|
||||
|
||||
pub enum FindMatchingBrace {}
|
||||
|
||||
impl Request for FindMatchingBrace {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue