Skip to content

Commit b098656

Browse files
committed
Fixes
1 parent 72c3331 commit b098656

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/extension.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ export class ClassCompletionItemProvider implements CompletionItemProvider, Disp
6969
const items = new Map<string, CompletionItem>();
7070
this.parseTextToItems(content.toString(), items);
7171

72-
const watcher = workspace.createFileSystemWatcher(file.fsPath);
72+
const watcher = workspace.createFileSystemWatcher(file.fsPath, true);
7373
const updater = (e: Uri) => this.cache.delete(key);
7474
this.disposables.push(
75-
watcher.onDidCreate(updater),
7675
watcher.onDidChange(updater),
7776
watcher.onDidDelete(updater),
7877
watcher);
@@ -169,14 +168,14 @@ export class ClassCompletionItemProvider implements CompletionItemProvider, Disp
169168
});
170169
}
171170

172-
buildItems(sets: Set<string>[], type: CompletionItemKind): CompletionItem[] {
171+
buildItems(sets: Set<string>[], kind: CompletionItemKind): CompletionItem[] {
173172
const items = new Map<string, CompletionItem>();
174173
const keys = new Set<string>();
175174

176175
sets.forEach(v => v.forEach(v => keys.add(v)));
177176

178177
keys.forEach(k => this.cache.get(k)?.forEach((v, k) => {
179-
if (type === v.kind) {
178+
if (kind === v.kind) {
180179
items.set(k, v);
181180
}
182181
}));

0 commit comments

Comments
 (0)