Notepad++ has a Language menu which we can use to set the language of the current file without saving it, which provides syntax highlighting. This is useful for quickly checking out things, like, pasting an XML file and quickly analyzing it, typing out some JS code and copying it into a console.
Is there a way to achieve this in vscode?
The easiest way to turn on Auto Save is with the File > Auto Save toggle that turns on and off save after a delay. For more control over Auto Save , open User or Workspace settings and find the associated settings: files.
To solve this you can Cmd + Shift + P → "install Extensions" and look for the language you want to add, say "Scala". Find the suitable Syntax package, install it and reload. This will pick up the correct syntax for your files with the predefined extension, i.e. . scala in this case.
To change the text and syntax colors in visual studio code follow the steps given below: Open VS Code editor to change the syntax colors. Go to Settings, which is on the bottom left corner of the VS Code window. In the search field type JSON, and click on the 'Edit in settings.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With