Skip to content

Commit

Permalink
feat: Add completion for OnCalendar
Browse files Browse the repository at this point in the history
  • Loading branch information
hangxingliu committed Feb 22, 2024
1 parent 0c12140 commit 65921dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vscode-completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { RequiredDirectiveCompletionItem } from "./hint-data/types-runtime";
import { SystemdFileType } from "./parser/file-info";
import { getSectionCompletionItems } from "./hint-data/get-section-completion";
import { getUnitNameCompletionItems } from "./hint-data/get-unit-name-completion";
import { getCalendarCompletion } from "./hint-data/get-calendar-completion";
import { SystemdDocumentManager } from "./vscode-documents";

const zeroPos = new Position(0, 0);
Expand Down Expand Up @@ -80,6 +81,8 @@ export class SystemdCompletionProvider implements CompletionItemProvider {
if (directive) {
const units = getUnitNameCompletionItems(directive);
if (units) return units;
const calendarWords = getCalendarCompletion(directive, pending);
if (calendarWords) return calendarWords;
}
return this.managers.filterValueEnum(cursorContext, fileType);
}
Expand Down

0 comments on commit 65921dc

Please sign in to comment.