mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
@@ -149,16 +149,25 @@ export default class FileConfigurationManager {
|
||||
}
|
||||
|
||||
const config = workspace.getConfiguration(
|
||||
isTypeScriptDocument(document) ? 'typescript' : 'javascript',
|
||||
document.uri);
|
||||
|
||||
const preferences = config.workspace.getConfiguration(
|
||||
isTypeScriptDocument(document) ? 'typescript.preferences' : 'javascript.preferences',
|
||||
document.uri);
|
||||
|
||||
return {
|
||||
quotePreference: getQuoteStylePreference(config),
|
||||
importModuleSpecifierPreference: getImportModuleSpecifierPreference(config)
|
||||
quotePreference: getQuoteStylePreference(preferences),
|
||||
importModuleSpecifierPreference: getImportModuleSpecifierPreference(preferences),
|
||||
disableSuggestions: disableSuggestionsPreference(config),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function disableSuggestionsPreference(config: WorkspaceConfiguration) {
|
||||
return !config.get<boolean>('suggestionActions.enabled');
|
||||
}
|
||||
|
||||
function getQuoteStylePreference(config: WorkspaceConfiguration) {
|
||||
switch (config.get<string>('quoteStyle')) {
|
||||
case 'single': return 'single';
|
||||
|
||||
Reference in New Issue
Block a user