Change:
import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import arrays = require('vs/base/common/arrays'); import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; <ins> import { IFilesConfiguration } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; </ins> import Event, { Emitter, once } from 'vs/base/common/event'; export const IUntitledEditorService = createDecorator<IUntitledEditorService>('untitledEditorService');

Discussion:
VSCode Version: 1.2.1 OS Version: Windows 10 64x Steps to Reproduce: create new file, before save file with '.js' extension and the manual language selection, need to have option to default language e.g. JavaScript, not plaintext as default
We would need to introduce a workbench configuration such that there is a default language mode for new files opened. Such that it is being picked up before a user manuly chooses a mode or sets the file extension.
I would think this could also be done nicely from an extension.
This is one of my key uses from PowerShell ISE that is hard to convert over to VS Code. I use the Untitled page often to construct commands and scripts rather than doing it in terminal because its much easier to edit and I'm not wanting to save it just yet. The trick though is this is Visual Studio Code and versatile so sometimes I will want the default to be different based on the language I'm focusing on in a given period. The two ways to handle this would be: Command Line option to select default language on startup. File New --Language menu options The first option allows me to create a shortcut focused on my language. VS Code PowerShell and VS Code C#. It would also make it easier for extensions to configure the environment more for their use if they knew someone was starting it up as their language. The second option should not be defaults, but rather configurations for me to add my own list to the File menu. I like both approaches but if I had to choose one, the first I think could be more useful.
I just looked into making an extension for this but there doesn't seem to be an API to change the language ID of a TextDocument. I tried passing the language ID as a parameter to but it always displays the quick pick dialog. Any ideas?
I think this can be done via a new command using the new API:
That doesn't work for new files that the user creates using "File -New", "Files: New File" or double-clicking in the tab area. Though maybe I should just send a PR to VS Code to add an official setting for default language mode :)
Oh yeah, but I would start with an extension first to see how it works. You can easily map it to Ctrl+N for "New File" by default.

All in all, also not opposed to seeing a PR on this, e.g. could be something like editor.defaultLanguage or file.defaultMode.
maybe? Not sure that most users know what a "mode" is.
I'm going to work on this today!
Verify: a new setting allows to configure the default language mode a new untitled file should get you can still change the mode from the picker and the untitled file will keep this association even between restarts