Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/lsp_ext.ts')
| -rw-r--r-- | editors/code/src/lsp_ext.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index 6c961f53e7..31ac3d9413 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts @@ -68,6 +68,42 @@ export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void> "rust-analyzer/viewItemTree", ); +export type DiscoverTestParams = { testId?: string | undefined }; +export type RunTestParams = { + include?: string[] | undefined; + exclude?: string[] | undefined; +}; +export type TestItem = { + id: string; + label: string; + kind: "package" | "module" | "test"; + canResolveChildren: boolean; + parent?: string | undefined; + textDocument?: lc.TextDocumentIdentifier | undefined; + range?: lc.Range | undefined; + runnable?: Runnable | undefined; +}; +export type DiscoverTestResults = { tests: TestItem[]; scope: string[] }; +export type TestState = + | { tag: "failed"; message: string } + | { tag: "passed" } + | { tag: "started" } + | { tag: "enqueued" } + | { tag: "skipped" }; +export type ChangeTestStateParams = { testId: string; state: TestState }; +export const discoverTest = new lc.RequestType<DiscoverTestParams, DiscoverTestResults, void>( + "experimental/discoverTest", +); +export const discoveredTests = new lc.NotificationType<DiscoverTestResults>( + "experimental/discoveredTests", +); +export const runTest = new lc.RequestType<RunTestParams, void, void>("experimental/runTest"); +export const abortRunTest = new lc.NotificationType0("experimental/abortRunTest"); +export const endRunTest = new lc.NotificationType0("experimental/endRunTest"); +export const changeTestState = new lc.NotificationType<ChangeTestStateParams>( + "experimental/changeTestState", +); + export type AnalyzerStatusParams = { textDocument?: lc.TextDocumentIdentifier }; export interface FetchDependencyListParams {} |