author | wenzelm |
Fri, 16 Jun 2017 16:21:17 +0200 | |
changeset 66096 | 6187612e83c1 |
parent 66052 | 39eb61b1fa51 |
child 66138 | f7ef4c50b747 |
permissions | -rw-r--r-- |
65201 | 1 |
'use strict'; |
2 |
||
3 |
import { Position, Range, MarkedString, DecorationOptions, DecorationRenderOptions } from 'vscode' |
|
4 |
import { NotificationType } from 'vscode-languageclient'; |
|
66052
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
5 |
import * as symbol from './symbol' |
65201 | 6 |
|
7 |
||
8 |
/* decorations */ |
|
9 |
||
10 |
export interface DecorationOpts { |
|
11 |
range: number[], |
|
12 |
hover_message?: MarkedString | MarkedString[] |
|
13 |
} |
|
14 |
||
15 |
export interface Decoration |
|
16 |
{ |
|
17 |
uri: string, |
|
18 |
"type": string, |
|
19 |
content: DecorationOpts[] |
|
20 |
} |
|
21 |
||
22 |
export const decoration_type = |
|
23 |
new NotificationType<Decoration, void>("PIDE/decoration") |
|
24 |
||
25 |
||
26 |
/* caret handling */ |
|
27 |
||
28 |
export interface Caret_Update |
|
29 |
{ |
|
30 |
uri?: string |
|
31 |
line?: number |
|
32 |
character?: number |
|
33 |
} |
|
34 |
||
35 |
export const caret_update_type = |
|
36 |
new NotificationType<Caret_Update, void>("PIDE/caret_update") |
|
37 |
||
38 |
||
39 |
/* dynamic output */ |
|
40 |
||
41 |
export interface Dynamic_Output |
|
42 |
{ |
|
65979 | 43 |
content: string |
65201 | 44 |
} |
45 |
||
46 |
export const dynamic_output_type = |
|
47 |
new NotificationType<Dynamic_Output, void>("PIDE/dynamic_output") |
|
65977
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
48 |
|
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
49 |
|
66096 | 50 |
/* state */ |
51 |
||
52 |
export interface State_Output |
|
53 |
{ |
|
54 |
id: number |
|
55 |
content: string |
|
56 |
} |
|
57 |
||
58 |
export const state_output_type = |
|
59 |
new NotificationType<State_Output, void>("PIDE/state_output") |
|
60 |
||
61 |
export interface State_Id |
|
62 |
{ |
|
63 |
id: number |
|
64 |
} |
|
65 |
||
66 |
export const state_init_type = new NotificationType<void, void>("PIDE/state_init") |
|
67 |
export const state_exit_type = new NotificationType<State_Id, void>("PIDE/state_exit") |
|
68 |
export const state_locate_type = new NotificationType<State_Id, void>("PIDE/state_locate") |
|
69 |
export const state_update_type = new NotificationType<State_Id, void>("PIDE/state_update") |
|
70 |
||
71 |
||
65983 | 72 |
/* preview */ |
65977
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
73 |
|
65983 | 74 |
export interface Preview_Request |
65977
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
75 |
{ |
65983 | 76 |
uri: string |
77 |
column: number |
|
78 |
} |
|
79 |
||
80 |
export interface Preview_Response |
|
81 |
{ |
|
82 |
uri: string |
|
83 |
column: number |
|
84 |
label: string |
|
65977
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
85 |
content: string |
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
86 |
} |
c51b74be23b6
provide preview content on Scala side (similar to output);
wenzelm
parents:
65201
diff
changeset
|
87 |
|
65983 | 88 |
export const preview_request_type = |
89 |
new NotificationType<Preview_Request, void>("PIDE/preview_request") |
|
90 |
||
91 |
export const preview_response_type = |
|
92 |
new NotificationType<Preview_Response, void>("PIDE/preview_response") |
|
66052
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
93 |
|
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
94 |
|
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
95 |
/* Isabelle symbols */ |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
96 |
|
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
97 |
export interface Symbols |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
98 |
{ |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
99 |
entries: [symbol.Entry] |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
100 |
} |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
101 |
|
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
102 |
export const symbols_type = |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
103 |
new NotificationType<Symbols, void>("PIDE/symbols") |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
104 |
|
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
105 |
export const symbols_request_type = |
39eb61b1fa51
provide information about Isabelle symbols within VSCode;
wenzelm
parents:
65983
diff
changeset
|
106 |
new NotificationType<void, void>("PIDE/symbols_request") |