/
protocol.ts
82 lines (68 loc) · 2.74 KB
/
protocol.ts
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
import * as vscode from 'vscode-languageserver-protocol';
import type * as html from 'vscode-html-languageservice';
/**
* Server request client
*/
export namespace ShowReferencesNotification {
export type ResponseType = vscode.TextDocumentPositionParams & { references: vscode.Location[]; };
export const type = new vscode.NotificationType<ResponseType>('vue.findReferences');
}
export namespace GetDocumentPrintWidthRequest {
export type ParamsType = vscode.TextDocumentIdentifier;
export type ResponseType = number | undefined;
export type ErrorType = never;
export const type = new vscode.RequestType<ParamsType, ResponseType, ErrorType>('vue/getDocumentWordWrapColumn');
}
export namespace FindFileReferenceRequest {
export type ParamsType = {
textDocument: vscode.TextDocumentIdentifier;
};
export type ResponseType = vscode.Location[] | null | undefined;
export type ErrorType = never;
export const type = new vscode.RequestType<ParamsType, ResponseType, ErrorType>('vue/findFileReference');
}
/**
* Client request server
*/
export namespace GetMatchTsConfigRequest {
export type ParamsType = vscode.TextDocumentIdentifier;
export type ResponseType = { fileName: string, raw: any } | null | undefined;
export type ErrorType = never;
export const type = new vscode.RequestType<ParamsType, ResponseType, ErrorType>('volar/tsconfig');
}
export namespace AutoInsertRequest {
export type ParamsType = vscode.TextDocumentPositionParams & {
options: {
lastChange: {
range: vscode.Range;
rangeOffset: number;
rangeLength: number;
text: string;
},
},
};
export type ResponseType = string | vscode.TextEdit | null | undefined;
export type ErrorType = never;
export const type = new vscode.RequestType<ParamsType, ResponseType, ErrorType>('vue/autoInsert');
}
export namespace VerifyAllScriptsNotification {
export const type = new vscode.NotificationType<vscode.TextDocumentIdentifier>('volar.action.verifyAllScripts');
}
export namespace WriteVirtualFilesNotification {
export const type = new vscode.NotificationType<vscode.TextDocumentIdentifier>('volar.action.writeVirtualFiles');
}
export namespace ReloadProjectNotification {
export const type = new vscode.NotificationType<vscode.TextDocumentIdentifier>('volar.action.reloadProject');
}
/**
* FS request for browser
*/
export namespace FsStatRequest {
export const type = new vscode.RequestType<vscode.DocumentUri, html.FileStat | undefined, unknown>('fs/stat');
}
export namespace FsReadFileRequest {
export const type = new vscode.RequestType<vscode.DocumentUri, string | undefined, unknown>('fs/readFile');
}
export namespace FsReadDirectoryRequest {
export const type = new vscode.RequestType<vscode.DocumentUri, [string, html.FileType][], unknown>('fs/readDirectory');
}