Skip to content

Commit 0d2a212

Browse files
committed
fix auto completion document
1 parent 455782c commit 0d2a212

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class AlicloudApiCommands {
3737
label: `${inter.method ? `[${inter.method}] ` : ""}${inter.path ? inter.path : inter.name}`,
3838
detail: `${pontSpec.name ? pontSpec.name + "/" : ""}${inter.name}`,
3939
description: `${inter.description || inter.summary || ""}`,
40+
summary: `${inter.summary || ""}`,
4041
};
4142
});
4243
})

src/provider/autoCompletion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CompletionItemProvider {
3333
completionItems = searchAPIs?.map((api) => {
3434
let completionItem = new vscode.CompletionItem(api.label, vscode.CompletionItemKind["Interface"]);
3535
completionItem.detail = api.detail;
36-
completionItem.documentation = api.description;
36+
completionItem.documentation = api.summary || api.description;
3737

3838
// 代码替换位置,查找位置会同步应用
3939
completionItem.range = new vscode.Range(
@@ -49,7 +49,7 @@ class CompletionItemProvider {
4949
vscode.CompletionItemKind["Interface"],
5050
);
5151
javaAsyncCompletionItem.detail = api.detail;
52-
javaAsyncCompletionItem.documentation = api.description;
52+
javaAsyncCompletionItem.documentation = api.summary || api.description;
5353

5454
// 代码替换位置,查找位置会同步应用
5555
javaAsyncCompletionItem.range = new vscode.Range(

0 commit comments

Comments
 (0)