Skip to content

Commit 691ba84

Browse files
committed
feat: Improve auto-completion for special systemd units
1 parent 52264f9 commit 691ba84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hint-data/manager/special-units.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,20 @@ export class SystemdUnitsManager {
8484
if (boundary.test(pendingText[i])) break;
8585
pending++;
8686
}
87-
const match = pendingText.match(/(?:^|\s)(.*?)$/);
88-
if (!match) return [];
8987

9088
if (!this.cached) {
9189
this.cached = this.builtInItems.map((it) => {
9290
const completion: SpecialUnitCompletionItem = new CompletionItem(it.name, CompletionItemKind.File);
9391
//#region patch
9492
if (it.name === "[email protected]") {
9593
completion.label = {label: it.name, detail: ' escaped-block-dev-node-path'};
94+
completion.filterText = it.name;
9695
completion.insertText = new SnippetString('blockdev@\${0:escaped_block_dev_node_path}.target');
9796
}
9897
//#endregion patch
9998
if (it.docs) completion.documentation = it.docs;
10099
if (it.since) completion.since = it.since;
100+
completion.commitCharacters = [' '];
101101
return completion;
102102
});
103103
}

0 commit comments

Comments
 (0)