Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set different default formatters in VSCode settings?

Is it possible to set different default formatters for different languages in VSCode? I want VSCode to autodetect the language used in current file and use the appropriate editor. How can I achieve this?

like image 652
StrangeMann Avatar asked Dec 13 '25 06:12

StrangeMann


1 Answers

You can press Ctrl + , keys to access the settings in VS Code, and then type in @lang:language-name Default Formatter (e.g @lang:html Default Formatter) or just scroll down to where it says Editor: Default Formatter and then choose the formatter for that language.

Reference image for more clarificarion

like image 152
Izebeafe Avatar answered Dec 15 '25 05:12

Izebeafe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!