Skip to content

Commit

Permalink
Restore detail in weidu completion. Fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed May 27, 2019
1 parent 27abbcf commit fbbdf56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@

## 1.0.5
- More IE constants supported.

## 1.0.6
- Fixed detail missing from weidu completion
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bgforge-mls",
"displayName": "BGforge MLS",
"description": "BGforge multilanguage server",
"version": "1.0.5",
"version": "1.0.6",
"author": "BGforge",
"repository": {
"type": "git",
Expand Down
13 changes: 5 additions & 8 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,12 @@ function load_completion() {
for (item in completion_yaml) {
let kind = parseInt(completion_yaml[item]['type']);
let element: any;
let dtl: string;
let detail: string;
let doc: string;
for (element of completion_yaml[item]['items']) {
if (!element['detail']) { // copy name to detail if it's empty
element['detail'] = element['name'];
}
if (!element['doc']) { // allow empty doc, too
element['doc'] = '';
}
completion_list.push({ label: element['name'], kind: kind, documentation: element['doc'], detail: dtl, source: "builtin" });
detail = element['detail'] || element['name']; // copy name to detail if it's empty
doc = element['doc'] || ''; // allow empty doc, too
completion_list.push({ label: element['name'], kind: kind, documentation: doc, detail: detail, source: "builtin" });
}
}
completion_map.set(lang_id, completion_list);
Expand Down

0 comments on commit fbbdf56

Please sign in to comment.