mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 16:25:00 +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