Skip to content

Commit ed4dd59

Browse files
authored
fix(lsp): add auto-import specifier cache for untitled files (#28)
1 parent 9f5c057 commit ed4dd59

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/ls/autoimport/registry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ func (b *registryBuilder) updateBucketAndDirectoryExistence(change RegistryChang
413413
for path, fileName := range change.OpenFiles {
414414
neededProjects[core.FirstResult(b.host.GetDefaultProject(path))] = struct{}{}
415415
if strings.HasPrefix(fileName, "^/") {
416+
if !b.specifierCache.Has(path) {
417+
b.specifierCache.Set(path, &collections.SyncMap[tspath.Path, string]{})
418+
}
416419
continue
417420
}
418421
dir := fileName

0 commit comments

Comments
 (0)