Change:
<!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --Current behavior: If a user opens a Python file (.py) or saves a file with a .py extension and does not have the Python extension installed, VS Code suggests installing the Python extension for Python support using the prompt below: <img width="236" alt="image" src=""Proposed behavior: It would be nice if we could have an installation trigger/prompt to install the Python extension before a user saves the file with the appropriate file extension. In this case, if the user creates a new untitled file --selects Python from the language dropdown --the user is prompted to install the Python extension (flow depicted in the gif below) ! In user studies, we have observed users struggle to find where to install the Python extension (or do not realize they need an extension for Python support) and do not think to save the file in this case causing them to get stuck at this point.
I remember this used to be supported and would have broken sometime back.
Another scenario I don't believe has been supported but could be useful is when users do not select Python as the language but instead just start typing Python code and the language model is able to detect it. Thoughts on enabling a prompt for this scenario as well?
Is not the other scenario same as this - At the end of both scenarios, the language mode of the file has changed to python. Language mode change will trigger the recommendation.
In the second scenario, the user has to click the lightbulb in order to get the language mode to change (or have the setting to automatically switch the language mode to the detected language enabled). The idea there was to prompt the user if the model detects their code to be Python, without the user having to click on the small lightbulb in the bottom corner. We haven't observed users engaging with or noticing the status bar much which was the motivator for this scenario.
I see. I will reopen the other issue for that scenario. Can you please update the issue and mention the use case clearly. Thanks.

Discussion:
const matchedRecommendations: IStringDictionary<IFileOpenCondition[]> = {}; const unmatchedRecommendations: IStringDictionary<IFileOpenCondition[]> = {}; let listenOnLanguageChange = false; <ins> const languageId = model.getLanguageId(); </ins> for (const [extensionId, conditions] of extensionRecommendationEntries) { const conditionsByPattern: IFileOpenCondition[] = [];

} if (isLanguageCondition) { <del> if ((<IFileLanguageCondition>condition).languages.includes(model.getLanguageId())) { </del> <ins> if ((<IFileLanguageCondition>condition).languages.includes(languageId)) { </ins> languageMatched = true; } }

processedPathGlobs.set(pathGlob, pathGlobMatched); } <del> if (!languageMatched && !pathGlobMatched) { // If the language is not matched and the path glob is not matched, then we don't need to check the other conditions </del> <ins> let matched = languageMatched || pathGlobMatched; // If the resource has pattern (extension) and not matched, then we don't need to check the other conditions if (pattern && !matched) { </ins> continue; } <del> let matched = true; </del> if (matched && condition.whenInstalled) { if (!condition.whenInstalled.every(id => installed.some(local => areSameExtensions({ id }, local.identifier)))) { matched = false;

} } <del> this.recommendationsByPattern.set(pattern, recommendationsByPattern); </del> <ins> if (pattern) { this.recommendationsByPattern.set(pattern, recommendationsByPattern); } </ins> if (Object.keys(unmatchedRecommendations).length) { if (listenOnLanguageChange) { const disposables = new DisposableStore();