Create new conf files with right indent settings

If you are prefer to use spaces instead of tabs - in most cases you
don't want to see tabs anywhere (copy paste issues with other files).

This fixes several workflows:

- Creating new Debug file
- Creating new Tasks file
- Showing global settings (this one is cached, so it shows for the first
  time only right indentation, if you will change it will show old
  indentation till restart)
This commit is contained in:
Denis Gladkikh
2016-04-19 21:01:50 -07:00
parent c83fa467d0
commit 0a4e82fbbd
7 changed files with 48 additions and 29 deletions
@@ -287,12 +287,16 @@ export class ConfigurationManager implements debug.IConfigurationManager {
return null;
}
return this.massageInitialConfigurations(adapter).then(() =>
JSON.stringify({
version: '0.2.0',
configurations: adapter.initialConfigurations ? adapter.initialConfigurations : []
}, null, '\t')
);
return this.massageInitialConfigurations(adapter).then(() => {
let editorConfig = this.configurationService.getConfiguration<any>();
return JSON.stringify(
{
version: '0.2.0',
configurations: adapter.initialConfigurations ? adapter.initialConfigurations : []
},
null,
editorConfig.insertSpaces ? strings.repeat(' ', editorConfig.tabSize) : '\t');
});
});
}