I sometimes edit JSON files in VS Code, I would like to set the default file type to be Json (e.g. when clicking CTRLN)
I didn't find any related setting, I use CTRL KM but it's not very productive.
Is there a way to set the default file type?
EDITED:
The solution is to use "files.defaultLanguage": "json"
In the bottom bar of VS Code, you'll see the label UTF-8. Click it to open the action bar and select Save with encoding. You can now pick a new encoding for that file.
Click File
–> Preferences
–> Settings
or CTRL + ,
Click to open the settings file and look for files.defaultLanguage
Move the cursor to this line or mouse hover on it, click the pencil sign shown on the left, click the Copy to Settings
, then add the file type in the right pane. such as
"files.defaultLanguage": "JSON",
CTRL + S
after finishing
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