blob: 0142a7634288d7a87e785672a99e0d5b316755da (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# Custom Messages
We extend the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/specification)
with custom messages to provide better LaTeX integration.
These messages are _optional_ and it is up to the client to support them.
## Build Request
The build request is sent from the client to the server to build a given LaTeX document.
_Request_:
- method: 'textDocument/build'
- params: `BuildTextDocumentParams` defined as follows:
```typescript
interface BuildTextDocumentParams {
/**
* The text document to build.
*/
textDocument: TextDocumentIdentifier;
}
```
_Response_:
- result: `BuildResult` defined as follows:
```typescript
interface BuildResult {
/**
* The status of the build process.
*/
status: BuildStatus;
}
enum BuildStatus {
/**
* The build process terminated without any errors.
*/
Success = 0,
/**
* The build process terminated with errors.
*/
Error = 1,
/**
* The build process failed to start or crashed.
*/
Failure = 2,
/**
* The build process was cancelled.
*/
Cancelled = 3,
}
```
## Forward Search Request
The forward search request is sent from the client to the server when the user requests a forward search via SyncTeX.
_Request_:
- method: 'textDocument/forwardSearch'
- params: [`TextDocumentPositionParams`](https://microsoft.github.io/language-server-protocol/specification#textdocumentpositionparams)
_Response_:
- result: `ForwardSearchResult` defined as follows:
```typescript
interface ForwardSearchResult {
/**
* The status of the previewer process.
*/
status: ForwardSearchStatus;
}
enum ForwardSearchStatus {
/**
* The previewer process executed the command without any errors.
*/
Success = 0,
/**
* The previewer process executed the command with errors.
*/
Error = 1,
/**
* The previewer process failed to start or crashed.
*/
Failure = 2,
/**
* The previewer command is not configured.
*/
Unconfigured = 3,
}
```
|