src/vs/workbench/services/textfile/browser/textFileService.ts/AbstractTextFileService/suggestFilename
class AbstractTextFileService:	suggestFilename(mode: string, untitledName: string) {
		const languageName = this.modeService.getLanguageName(mode);
		if (!languageName) {
			return untitledName;
		}

		const extension = this.modeService.getExtensions(languageName)[0];
		if (extension) {
			if (!untitledName.endsWith(extension)) {
				return untitledName + extension;
			}
		}

		const filename = this.modeService.getFilenames(languageName)[0];
		return filename || untitledName;
	}