mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-17 18:57:04 +00:00
prettier run
This commit is contained in:
parent
8e9f54f238
commit
f247090558
24 changed files with 1169 additions and 808 deletions
|
|
@ -7,7 +7,9 @@ import * as lc from "vscode-languageclient";
|
|||
export interface AnalyzerStatusParams {
|
||||
textDocument?: lc.TextDocumentIdentifier;
|
||||
}
|
||||
export const analyzerStatus = new lc.RequestType<AnalyzerStatusParams, string, void>("rust-analyzer/analyzerStatus");
|
||||
export const analyzerStatus = new lc.RequestType<AnalyzerStatusParams, string, void>(
|
||||
"rust-analyzer/analyzerStatus"
|
||||
);
|
||||
export const memoryUsage = new lc.RequestType0<string, void>("rust-analyzer/memoryUsage");
|
||||
export const shuffleCrateGraph = new lc.RequestType0<null, void>("rust-analyzer/shuffleCrateGraph");
|
||||
|
||||
|
|
@ -16,7 +18,9 @@ export interface ServerStatusParams {
|
|||
quiescent: boolean;
|
||||
message?: string;
|
||||
}
|
||||
export const serverStatus = new lc.NotificationType<ServerStatusParams>("experimental/serverStatus");
|
||||
export const serverStatus = new lc.NotificationType<ServerStatusParams>(
|
||||
"experimental/serverStatus"
|
||||
);
|
||||
|
||||
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
|
||||
|
||||
|
|
@ -31,23 +35,33 @@ export interface SyntaxTreeParams {
|
|||
textDocument: lc.TextDocumentIdentifier;
|
||||
range: lc.Range | null;
|
||||
}
|
||||
export const syntaxTree = new lc.RequestType<SyntaxTreeParams, string, void>("rust-analyzer/syntaxTree");
|
||||
export const syntaxTree = new lc.RequestType<SyntaxTreeParams, string, void>(
|
||||
"rust-analyzer/syntaxTree"
|
||||
);
|
||||
|
||||
export const viewHir = new lc.RequestType<lc.TextDocumentPositionParams, string, void>("rust-analyzer/viewHir");
|
||||
export const viewHir = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
|
||||
"rust-analyzer/viewHir"
|
||||
);
|
||||
|
||||
export const viewFileText = new lc.RequestType<lc.TextDocumentIdentifier, string, void>("rust-analyzer/viewFileText");
|
||||
export const viewFileText = new lc.RequestType<lc.TextDocumentIdentifier, string, void>(
|
||||
"rust-analyzer/viewFileText"
|
||||
);
|
||||
|
||||
export interface ViewItemTreeParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
}
|
||||
|
||||
export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>("rust-analyzer/viewItemTree");
|
||||
export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>(
|
||||
"rust-analyzer/viewItemTree"
|
||||
);
|
||||
|
||||
export interface ViewCrateGraphParams {
|
||||
full: boolean;
|
||||
}
|
||||
|
||||
export const viewCrateGraph = new lc.RequestType<ViewCrateGraphParams, string, void>("rust-analyzer/viewCrateGraph");
|
||||
export const viewCrateGraph = new lc.RequestType<ViewCrateGraphParams, string, void>(
|
||||
"rust-analyzer/viewCrateGraph"
|
||||
);
|
||||
|
||||
export interface ExpandMacroParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
|
|
@ -57,23 +71,35 @@ export interface ExpandedMacro {
|
|||
name: string;
|
||||
expansion: string;
|
||||
}
|
||||
export const expandMacro = new lc.RequestType<ExpandMacroParams, ExpandedMacro | null, void>("rust-analyzer/expandMacro");
|
||||
export const expandMacro = new lc.RequestType<ExpandMacroParams, ExpandedMacro | null, void>(
|
||||
"rust-analyzer/expandMacro"
|
||||
);
|
||||
|
||||
export interface MatchingBraceParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
positions: lc.Position[];
|
||||
}
|
||||
export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], void>("experimental/matchingBrace");
|
||||
export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], void>(
|
||||
"experimental/matchingBrace"
|
||||
);
|
||||
|
||||
export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.LocationLink[] | null, void>("experimental/parentModule");
|
||||
export const parentModule = new lc.RequestType<
|
||||
lc.TextDocumentPositionParams,
|
||||
lc.LocationLink[] | null,
|
||||
void
|
||||
>("experimental/parentModule");
|
||||
|
||||
export interface JoinLinesParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
ranges: lc.Range[];
|
||||
}
|
||||
export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], void>("experimental/joinLines");
|
||||
export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], void>(
|
||||
"experimental/joinLines"
|
||||
);
|
||||
|
||||
export const onEnter = new lc.RequestType<lc.TextDocumentPositionParams, lc.TextEdit[], void>("experimental/onEnter");
|
||||
export const onEnter = new lc.RequestType<lc.TextDocumentPositionParams, lc.TextEdit[], void>(
|
||||
"experimental/onEnter"
|
||||
);
|
||||
|
||||
export interface RunnablesParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
|
|
@ -93,13 +119,17 @@ export interface Runnable {
|
|||
overrideCargo?: string;
|
||||
};
|
||||
}
|
||||
export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>("experimental/runnables");
|
||||
export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>(
|
||||
"experimental/runnables"
|
||||
);
|
||||
|
||||
export interface TestInfo {
|
||||
runnable: Runnable;
|
||||
}
|
||||
|
||||
export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, TestInfo[], void>("rust-analyzer/relatedTests");
|
||||
export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, TestInfo[], void>(
|
||||
"rust-analyzer/relatedTests"
|
||||
);
|
||||
|
||||
export interface SsrParams {
|
||||
query: string;
|
||||
|
|
@ -108,7 +138,7 @@ export interface SsrParams {
|
|||
position: lc.Position;
|
||||
selections: readonly lc.Range[];
|
||||
}
|
||||
export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>('experimental/ssr');
|
||||
export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>("experimental/ssr");
|
||||
|
||||
export interface CommandLink extends lc.Command {
|
||||
/**
|
||||
|
|
@ -122,15 +152,21 @@ export interface CommandLinkGroup {
|
|||
commands: CommandLink[];
|
||||
}
|
||||
|
||||
export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>('experimental/externalDocs');
|
||||
export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>(
|
||||
"experimental/externalDocs"
|
||||
);
|
||||
|
||||
export const openCargoToml = new lc.RequestType<OpenCargoTomlParams, lc.Location, void>("experimental/openCargoToml");
|
||||
export const openCargoToml = new lc.RequestType<OpenCargoTomlParams, lc.Location, void>(
|
||||
"experimental/openCargoToml"
|
||||
);
|
||||
|
||||
export interface OpenCargoTomlParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
}
|
||||
|
||||
export const moveItem = new lc.RequestType<MoveItemParams, lc.TextEdit[], void>("experimental/moveItem");
|
||||
export const moveItem = new lc.RequestType<MoveItemParams, lc.TextEdit[], void>(
|
||||
"experimental/moveItem"
|
||||
);
|
||||
|
||||
export interface MoveItemParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
|
|
@ -140,5 +176,5 @@ export interface MoveItemParams {
|
|||
|
||||
export const enum Direction {
|
||||
Up = "Up",
|
||||
Down = "Down"
|
||||
Down = "Down",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue