mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
When ensureConfigurationForDocument is called and no visible text editor is found for the document, getFormattingOptions returns undefined and the method returns early without sending any configuration including user preferences like preferTypeOnlyAutoImports to the TS server. This causes source.addMissingImports to ignore the user's preferTypeOnlyAutoImports setting. Fix by falling back to undefined formatting options when no visible editor is found, ensuring user preferences are always sent. Closes #272479
Language Features for TypeScript and JavaScript files
Notice: This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
Features
See TypeScript in Visual Studio Code and JavaScript in Visual Studio Code to learn about the features of this extension.