don't autocomplete in empty, untitled files

This commit is contained in:
Nate 2024-12-13 08:17:13 -08:00
parent c0f9df9d01
commit 3bc23ede36

View file

@ -70,6 +70,14 @@ export async function shouldPrefilter(
return true;
}
// Don't offer completions when we have no information (untitled file and no file contents)
if (
helper.filepath.includes("Untitled") &&
helper.fileContents.trim() === ""
) {
return true;
}
// if (
// helper.options.transform &&
// (await shouldLanguageSpecificPrefilter(helper))