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.ts45
1 files changed, 39 insertions, 6 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 872d7199b8..b72804e510 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -10,12 +10,9 @@ export const hover = new lc.RequestType<
HoverParams,
(lc.Hover & { actions: CommandLinkGroup[] }) | null,
void
->("textDocument/hover");
-export type HoverParams = { position: lc.Position | lc.Range } & Omit<
- lc.TextDocumentPositionParams,
- "position"
-> &
- lc.WorkDoneProgressParams;
+>(lc.HoverRequest.method);
+export type HoverParams = { position: lc.Position | lc.Range } & Omit<lc.HoverParams, "position">;
+
export type CommandLink = {
/**
* A tooltip for the command, when represented in the UI.
@@ -43,6 +40,7 @@ export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, Te
"rust-analyzer/relatedTests"
);
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
+export const rebuildProcMacros = new lc.RequestType0<null, void>("rust-analyzer/rebuildProcMacros");
export const runFlycheck = new lc.NotificationType<{
textDocument: lc.TextDocumentIdentifier | null;
@@ -63,12 +61,47 @@ export const viewHir = new lc.RequestType<lc.TextDocumentPositionParams, string,
export const viewMir = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
"rust-analyzer/viewMir"
);
+export const interpretFunction = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
+ "rust-analyzer/interpretFunction"
+);
export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>(
"rust-analyzer/viewItemTree"
);
export type AnalyzerStatusParams = { textDocument?: lc.TextDocumentIdentifier };
+export interface FetchDependencyListParams {}
+
+export interface FetchDependencyListResult {
+ crates: {
+ name: string | undefined;
+ version: string | undefined;
+ path: string;
+ }[];
+}
+
+export const fetchDependencyList = new lc.RequestType<
+ FetchDependencyListParams,
+ FetchDependencyListResult,
+ void
+>("rust-analyzer/fetchDependencyList");
+
+export interface FetchDependencyGraphParams {}
+
+export interface FetchDependencyGraphResult {
+ crates: {
+ name: string;
+ version: string;
+ path: string;
+ }[];
+}
+
+export const fetchDependencyGraph = new lc.RequestType<
+ FetchDependencyGraphParams,
+ FetchDependencyGraphResult,
+ void
+>("rust-analyzer/fetchDependencyGraph");
+
export type ExpandMacroParams = {
textDocument: lc.TextDocumentIdentifier;
position: lc.Position;