mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 07:15:54 +01:00
Improve notebook language detection CPU (#148761)
* Default to only show language detection hints in text editors (#148663) * Default to only show language detection hints in text editors Fixes https://github.com/microsoft/vscode/issues/148220 * Update to object-based config * Clarify type of untitled editor * Limit detection to modified cells, once per second * Re-enable in notebooks
This commit is contained in:
@@ -113,17 +113,21 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
|
||||
description: localize('workbench.editor.preferBasedLanguageDetection', "When enabled, a language detection model that takes into account editor history will be given higher precedence."),
|
||||
},
|
||||
'workbench.editor.languageDetectionHints': {
|
||||
type: 'string',
|
||||
default: 'always',
|
||||
type: 'object',
|
||||
default: { 'untitledEditors': true, 'notebookEditors': true },
|
||||
tags: ['experimental'],
|
||||
enum: ['always', 'notebookEditors', 'textEditors', 'never'],
|
||||
description: localize('workbench.editor.showLanguageDetectionHints', "When enabled, shows a status bar quick fix when the editor language doesn't match detected content language."),
|
||||
enumDescriptions: [
|
||||
localize('workbench.editor.showLanguageDetectionHints.always', "Show show language detection quick fixes in both notebooks and untitled editors"),
|
||||
localize('workbench.editor.showLanguageDetectionHints.notebook', "Only show language detection quick fixes in notebooks"),
|
||||
localize('workbench.editor.showLanguageDetectionHints.editors', "Only show language detection quick fixes in untitled editors"),
|
||||
localize('workbench.editor.showLanguageDetectionHints.never', "Never show language quick fixes"),
|
||||
]
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
untitledEditors: {
|
||||
type: 'boolean',
|
||||
description: localize('workbench.editor.showLanguageDetectionHints.editors', "Show in untitled text editors"),
|
||||
},
|
||||
notebookEditors: {
|
||||
type: 'boolean',
|
||||
description: localize('workbench.editor.showLanguageDetectionHints.notebook', "Show in notebook editors"),
|
||||
}
|
||||
}
|
||||
},
|
||||
'workbench.editor.tabCloseButton': {
|
||||
'type': 'string',
|
||||
|
||||
Reference in New Issue
Block a user