mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add runnables
This commit is contained in:
parent
b79c8b6d8a
commit
5751815314
7 changed files with 115 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use serde::{ser::Serialize, de::DeserializeOwned};
|
||||
use languageserver_types::{TextDocumentIdentifier, Range, Url, Position, Location};
|
||||
use url_serde;
|
||||
|
@ -134,3 +136,28 @@ pub struct JoinLinesParams {
|
|||
pub text_document: TextDocumentIdentifier,
|
||||
pub range: Range,
|
||||
}
|
||||
|
||||
pub enum Runnables {}
|
||||
|
||||
impl Request for Runnables {
|
||||
type Params = RunnablesParams;
|
||||
type Result = Vec<Runnable>;
|
||||
const METHOD: &'static str = "m/joinLines";
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RunnablesParams {
|
||||
pub text_document: TextDocumentIdentifier,
|
||||
pub position: Option<Position>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Runnable {
|
||||
pub range: Range,
|
||||
pub label: String,
|
||||
pub bin: String,
|
||||
pub args: Vec<String>,
|
||||
pub env: HashMap<String, String>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue