forked from SpaceManiac/SpacemanDMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextras.rs
More file actions
70 lines (65 loc) · 1.92 KB
/
extras.rs
File metadata and controls
70 lines (65 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Extensions to the language server protocol.
use lsp_types::SymbolKind;
use lsp_types::notification::*;
use lsp_types::request::*;
pub enum WindowStatus {}
impl Notification for WindowStatus {
const METHOD: &'static str = "$window/status";
type Params = WindowStatusParams;
}
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct WindowStatusParams {
pub environment: Option<String>,
pub tasks: Vec<String>,
}
pub enum ObjectTree {}
impl Notification for ObjectTree {
const METHOD: &'static str = "experimental/dreammaker/objectTree";
type Params = ObjectTreeParams;
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ObjectTreeParams {
pub root: ObjectTreeType,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ObjectTreeType {
pub name: String,
pub kind: SymbolKind,
pub location: Option<lsp_types::Location>,
pub vars: Vec<ObjectTreeVar>,
pub procs: Vec<ObjectTreeProc>,
pub children: Vec<ObjectTreeType>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ObjectTreeVar {
pub name: String,
pub kind: SymbolKind,
pub location: Option<lsp_types::Location>,
pub is_declaration: bool,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ObjectTreeProc {
pub name: String,
pub kind: SymbolKind,
pub location: Option<lsp_types::Location>,
pub is_verb: Option<bool>,
}
pub enum Reparse {}
impl Notification for Reparse {
const METHOD: &'static str = "experimental/dreammaker/reparse";
type Params = lsp_types::InitializedParams;
}
pub enum StartDebugger {}
impl Request for StartDebugger {
const METHOD: &'static str = "experimental/dreammaker/startDebugger";
type Params = StartDebuggerParams;
type Result = StartDebuggerResult;
}
#[derive(Debug, Serialize, Deserialize)]
pub struct StartDebuggerParams {
pub dreamseeker_exe: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct StartDebuggerResult {
pub port: u16,
}