matching brace

This commit is contained in:
Aleksey Kladov 2018-08-16 00:23:22 +03:00
parent aa0d344581
commit c631b585a7
9 changed files with 135 additions and 14 deletions

View file

@ -1,5 +1,5 @@
use serde::{ser::Serialize, de::DeserializeOwned};
use languageserver_types::{TextDocumentIdentifier, Range, Url};
use languageserver_types::{TextDocumentIdentifier, Range, Url, Position};
use url_serde;
pub use languageserver_types::{
@ -65,6 +65,21 @@ pub struct ExtendSelectionResult {
pub selections: Vec<Range>,
}
pub enum FindMatchingBrace {}
impl Request for FindMatchingBrace {
type Params = FindMatchingBraceParams;
type Result = Vec<Position>;
const METHOD: &'static str = "m/findMatchingBrace";
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct FindMatchingBraceParams {
pub text_document: TextDocumentIdentifier,
pub offsets: Vec<Position>,
}
pub enum PublishDecorations {}
impl Notification for PublishDecorations {