aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/lsp_ext.ts
diff options
context:
space:
mode:
authorMikhail Rakhmanov <[email protected]>2020-06-13 07:42:15 +0100
committerMikhail Rakhmanov <[email protected]>2020-06-13 07:42:15 +0100
commit16bbf4ab7f132e6e5e5318dccdef9a5d71afdd7f (patch)
tree4b79fa8c046be56b02427ba843e70cdf3ac05767 /editors/code/src/lsp_ext.ts
parenteeb8b9e236796da8734ba81a49164864497f7226 (diff)
parentb56ad148db0c69eb279c225f45d324b4e80e7367 (diff)
Merge branch 'master' into keyword_completion
# Conflicts: # docs/user/generated_features.adoc
Diffstat (limited to 'editors/code/src/lsp_ext.ts')
-rw-r--r--editors/code/src/lsp_ext.ts34
1 files changed, 27 insertions, 7 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 4da12eb30..e16ea799c 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -33,6 +33,12 @@ export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position
33 33
34export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.LocationLink[], void>("experimental/parentModule"); 34export const parentModule = new lc.RequestType<lc.TextDocumentPositionParams, lc.LocationLink[], void>("experimental/parentModule");
35 35
36export interface ResolveCodeActionParams {
37 id: string;
38 codeActionParams: lc.CodeActionParams;
39}
40export const resolveCodeAction = new lc.RequestType<ResolveCodeActionParams, lc.WorkspaceEdit, unknown>('experimental/resolveCodeAction');
41
36export interface JoinLinesParams { 42export interface JoinLinesParams {
37 textDocument: lc.TextDocumentIdentifier; 43 textDocument: lc.TextDocumentIdentifier;
38 ranges: lc.Range[]; 44 ranges: lc.Range[];
@@ -45,16 +51,18 @@ export interface RunnablesParams {
45 textDocument: lc.TextDocumentIdentifier; 51 textDocument: lc.TextDocumentIdentifier;
46 position: lc.Position | null; 52 position: lc.Position | null;
47} 53}
54
48export interface Runnable { 55export interface Runnable {
49 range: lc.Range;
50 label: string; 56 label: string;
51 bin: string; 57 location?: lc.LocationLink;
52 args: string[]; 58 kind: "cargo";
53 extraArgs: string[]; 59 args: {
54 env: { [key: string]: string }; 60 workspaceRoot?: string;
55 cwd: string | null; 61 cargoArgs: string[];
62 executableArgs: string[];
63 };
56} 64}
57export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>("rust-analyzer/runnables"); 65export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>("experimental/runnables");
58 66
59export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint | InlayHint.ChainingHint; 67export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint | InlayHint.ChainingHint;
60 68
@@ -82,3 +90,15 @@ export interface SsrParams {
82 parseOnly: boolean; 90 parseOnly: boolean;
83} 91}
84export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>('experimental/ssr'); 92export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>('experimental/ssr');
93
94export interface CommandLink extends lc.Command {
95 /**
96 * A tooltip for the command, when represented in the UI.
97 */
98 tooltip?: string;
99}
100
101export interface CommandLinkGroup {
102 title?: string;
103 commands: CommandLink[];
104}