Is there a way in vscode to enable syntax highlighting without saving the file? [duplicate]

Solution 1:

In the lower right corner of the vscode window (next to the tweet feedback smiley face button) is the current language used for the opened file. If you click the current language (defaults to "Plain Text" for me) you will be given an option to select the language for the file. No need to save the file with an extension.

You could also press Ctrl+Shift+P and type "Change Language Mode" to get to the same language prompt