-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
52 lines (43 loc) · 1.33 KB
/
types.go
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
package main
type Position struct {
Line int `json:"line"`
Character int `json:"character"`
}
type Diagnostic struct {
//JsonRpc string `json:"jsonrpc"` // must be "2.0"
Source string `json:"source,omitempty"`
Severity int `json:"severity,omitempty"`
Range Range `json:"range"`
Msg string `json:"message"`
}
type Capabilities struct {
DefinitionProvider bool `json:"definitionProvider"`
HoverProvider bool `json:"hoverProvider"`
CompletionProvider interface{} `json:"completionProvider"`
DocumentHighlightProvider bool `json:"documentHighlightProvider"`
CodeActionProvider bool `json:"codeActionProvider"`
TextDocumentSync int `json:"textDocumentSync"`
}
type PublishDiagnostics struct {
Uri string `json:"uri"`
Diagnostics []Diagnostic `json:"diagnostics"`
}
type Range struct {
Start Position `json:"start"`
End Position `json:"end"`
}
type PIDERange struct {
Range [4]int `json:"range"`
}
type TextEdit struct {
Range Range `json:"range"`
NewText string `json:"newText"`
}
type WorkspaceEdit struct {
Changes map[string][]TextEdit `json:"changes"`
}
type CodeAction struct {
Title string `json:"title"`
Kind string `json:"kind"`
WorkspaceEdit WorkspaceEdit `json:"edit"`
}