Although English is not my first language, I found this tutorial so easy to understand thanks to your excellent and clear explanation! Impressed and subscribed 🤗
Be carful with the format on save. When you format code that you have not changed and commit it to git it can make it hard to tell what the REAL changes for the commit are. Easy to work around this, just run prettier on the whole code base (WITHOUT ANYT OTHER CHANGES) then check it in. Then running the formatter on save will not obfuscate the real changes in your commits.
Installed prettier but it did not come up in the "Format Document With" menu. Nor was it available as an option when I clicked "Configure Default Formatter".
Not that I’m aware of. Prettier is very opinionated and does not offer to many options. You can always save a file with out formatting from vscode if you don’t want to format a particular file. Here are the options they provide prettier.io/docs/en/options.html
I started to learn with Angela's Yu course. In the begining she was using Atom and had Beautify, that was great, started to be used of that, but...like everyone has to move to VS, i felt without hands. She had a addon list but didn't know how to "activate" prettier. Thx
Great question, prettier is a code formatter so it’s main purpose is to format the code rather than to report on formatting issues. With linting you can get a report of problems. Hope that helps.
any help, when i save (autoformat on save) using prettier, some slashes write themself at the very top where there should be a void, such as the meta info and any other. how can i disable or chagne that so it doesnt do that. thanks in advance
I have noticed that the option "format document with" only appear if you have an extra formatter installed..if anyone's wondering why they don't see that option.
bro recently i have been getting some colored boxes whenever i format the code ...its actually at the start of a line of code idk how that happened but i m pretty sure i have my default formatter as prettier . what exactly happened is that it asked me to configure my formatter out of nowhere i set it to prettier now i m getting wierd colored boxes in the begining of code lines .
@@CodingWithAdam thx for the concern, well anyways it was because of indent rainbow extension, i havent installed such ext myself maybe it came as a package with other extension.
Hey, do you know how to disable formatting spaces? I just want prettier to add semicolons and single quotes in javascript files but I don't want it to get rid of extra lines in my code. You'd be a live saver!
Unfortunately prettier is a opinionated formatter with very few options. From there website: Prettier is not a kitchen-sink code formatter that attempts to print your code in any way you wish. It is opinionated. Quoting the Why Prettier? page: By far the biggest reason for adopting Prettier is to stop all the ongoing debates over styles. prettier.io/docs/en/option-philosophy.html
Sorry to hear that. Prettier does not work for C. You can try this extension for formatting C files. marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
I can’t even make a js file!!😢😢😢 why it’s your file showing a path to the file like mine is??? What am I doing wrong, what don’t I know that I don’t know??? I don’t see “code formatting” on my left window, all I have is “open editors” and “outline”, how do I get a “code formatting” option or folder over there????
It does not support python. I suggest checking out a formatter for python called black. marketplace.visualstudio.com/items?itemName=ms-python.black-formatter Here is a helpful article code.visualstudio.com/docs/python/formatting
you'd be a life saver if you could tell me where the options are to turn off spaces for anonymous functions (before parens). In vscode I turned off the setting but prettier is still over riding the setting and adding a space when saving :(
That's a great question prettier is very opinionated and does not provide many options. I took a look and didn't see anything that could do that. Here is a fun way to explore prettier with an interactive playground. prettier.io/playground/
Prettier does not support python. I suggest checking out autopep8 or black to format python code. Here is an article that should help dev.to/eegli/quick-guide-to-python-formatting-in-vs-code-2040
Can someone help, Whenever I save my JS file prettier adds spaces in my operating chaining operator let weight3 = baas_pokemon?.pickachu?.weight let weight3 = baas_pokemon ? .pickachu ? .weight please help.
Bro thank you very much. I searched for this solution everywhere but I didn't find. This video really helped me. Now my prettier is working.
You’re welcome! I’m glad the tutorial was helpful! 😁
LOVE YOUUUUU workspace setting i was stucking on it thank you
You’re welcome! I’m glad the tutorial helped! 😁
Although English is not my first language, I found this tutorial so easy to understand thanks to your excellent and clear explanation! Impressed and subscribed 🤗
Thank you! I’m really happy the video was easy to follow! 😁
"IndentPPDirectives:BeforeHash" is not working, i use too much preprocessing directive and it literally annoying @@CodingWithAdam
Just what I was looking for to resolve my code formatting issue. Thanks Adam!
You’re welcome! really glad the tutorial helped!
Excellent explanation! You just made my day. Thank you so much, Adam.
Thank you! You’re welcome glad you enjoyed the tutorial. You’re comment made my day as well 😁
presh helped me a lot since im just starting to learn and it takes sooooooo much effort to just press shift lol
Glad the video helped!
wow ,
I didn't know that prettier is so nice before watching this video
thanks for the nice video
You’re welcome! Glad you enjoyed the video.
Amazing video. This has saved me lots of time trying to keep my code neat. Thanks!
You’re welcome! I’m really happy you enjoyed the tutorial!
what button do you press on keyboard , so you activate it after you are done with project ?
Nice job with explaining bud. Was very easy to understand.
Thank you! Glad you enjoyed the tutorial!
Be carful with the format on save. When you format code that you have not changed and commit it to git it can make it hard to tell what the REAL changes for the commit are. Easy to work around this, just run prettier on the whole code base (WITHOUT ANYT OTHER CHANGES) then check it in. Then running the formatter on save will not obfuscate the real changes in your commits.
Those are great tips! Thanks!
Thanks for the tutorial!
You’re welcome!
Yeah dude, this video nailed it, here is a new sub!
Glad the video helped! Thank you for the Sub!
Thank you sir. great explanation video 👍
You’re welcome! Glad the tutorial was helpful!
Clear explanation. Thank you
Thank you. You’re welcome!
now i understant how automatic formatiing the code thanks very much
You’re welcome! Glad the tutorial was helpful! 😁
Explained perfectly.
Thank you!
Thanks for the config file and the 'semi' parameter !
You’re welcome!
Thank you! Just what I was looking for.
You’re welcome!
Thank u so much! That was helpful!
You're welcome! Glad the video was helpful.
thanks, this video help me and easy to understand
You’re welcome! Glad the video was easy to understand! 😀
Man, you are the best! thank you for this video !
Thank you! I’m glad you enjoyed the video!
Thanks for the video :)
You’re welcome!
Smooth language and video good job
Thank you!!! Appreciate the feedback!
Thanks man. It helps me too much !!!
You’re welcome! Glad the tutorial helped!
Thanks Adam, for to the point explanat. 😀
You’re welcome!
This is a good thing you've done
Thank you!
awesome Tutorial - Thank you Adam.
You’re welcome! 😁
awesome video, Thanks for taking the time to do this! helped me get my Sh*T together lol...
You’re welcome! I’m so glad the video helped! 😁
Thank you!
You’re welcome!
Thank you for this, I was wondering if I was doing something wrong.
You’re welcome! I’m glad the video helped!
Great, informative and on point !
Thank You!
Thanks for the help!
You’re welcome!
perfect vedio than others
Thank you! 😁
very helpfull video, thanks bro )
You’re welcome!
Amazing video
Thank you! 😁
Very informative. Thank you
Thank you. You’re welcome!
Bro thank you very much
You're welcome! Glad the video helped!
Thank u! Great description! =)
You’re welcome! Thank you :)
Thank you very much!
You’re welcome! Glad you enjoyed the video!
Thanks for video tutorijal, I'm subscribe, like and share. Bay.
You’re welcome! Thank you for subbing liking and sharing 😁
Thanks a lot! Nice tutorial :)
You’re welcome! Glad you enjoyed the tutorial 😁
Nice video man make more coding tutorials u rock👑💯
Thank you! 😁
Amazing top video!
Thank you!
Installed prettier but it did not come up in the "Format Document With" menu. Nor was it available as an option when I clicked "Configure Default Formatter".
Restart vs code and then check the extensions tab to see that prettier is installed and enabled
Turns out that prettier will not work with Python. Must use a different formatter for Python.
That’s right you need to use one for python. Glad you figured it out
Is there a way so it formats without changing any quote?
I mean ' remain '
And " remain "
Not that I’m aware of. Prettier is very opinionated and does not offer to many options. You can always save a file with out formatting from vscode if you don’t want to format a particular file. Here are the options they provide prettier.io/docs/en/options.html
Thanks - very clear.
You’re welcome!
Nice and right to the point!
Thanks!
You’re welcome! Glad you liked the video! 😁
Thanks for sharing your tutorial. :D
You’re welcome!
Informative! Thanks for sharing your great experience.
You’re welcome! Happy you enjoyed the video!
well explained sir. Thank you! Subscribed
You’re welcome! Thank you for subscribing!
Great job! Thanks for help.
Thank you! You're welcome!
This is a great video.
Thanks. Glad the video helped!
Good one! Tnx
Thank you! You’re welcome!
I started to learn with Angela's Yu course. In the begining she was using Atom and had Beautify, that was great, started to be used of that, but...like everyone has to move to VS, i felt without hands. She had a addon list but didn't know how to "activate" prettier. Thx
You’re welcome! The auto formatting is awesome it’s hard to code with out it. Happy the video helped! 😃
thank you very much sir
You’re welcome!!!
prettier isn't appearing after installing
I installed the plugin but I only have a format with Redhat entry and no prettier ... - am I missing something?
Actually I can set prettier as a default formatter but then it throws an error that it's not available ....
I understand it's not a linter but can't it still report in the problems filed such as ""No semi-colon required on line x"?. This would be great
Great question, prettier is a code formatter so it’s main purpose is to format the code rather than to report on formatting issues. With linting you can get a report of problems. Hope that helps.
my code is too narrow and looks vertical, what should i do, thanks for the video
You’re welcome. Prettier has configuration for the length of a line I suggest take a look at printWidth prettier.io/docs/en/options.html
Thank you🎉
You’re welcome 😁
thank you man
You’re welcome!
Thanks
❤
You’re welcome! 😀
Amazing video!
Thank you! 😁
thanks man, this help full me
You’re welcome!
thanks , it worked for me :)
You're welcome!
Appreciate it!
You’re welcome!
Very helpful, thanks.
You’re welcome!
any help, when i save (autoformat on save) using prettier, some slashes write themself at the very top where there should be a void, such as the meta info and any other. how can i disable or chagne that so it doesnt do that. thanks in advance
Prettier is an opinionated formatter and there are not many settings. That interesting problem.
So we don't need .editorconfig (for indentation) ?
Good question I have never used editorconfig but yes this could replace it if that is the only thing you use it for.
Thank you :)
You’re welcome!!!
I been learning js for about a year, but this extension never worked on my pc. I don't know why.
Sorry to hear that.
Great one :)
Thank you!
thanks man!
You're Welcome!
Thanks alot.
You’re welcome!
My c File code is not formatted...
Unfortunately prettier does not support c files.
I have noticed that the option "format document with" only appear if you have an extra formatter installed..if anyone's wondering why they don't see that option.
Thank you for the extra tip. I must have had a few formatters installed.
bro recently i have been getting some colored boxes whenever i format the code ...its actually at the start of a line of code idk how that happened but i m pretty sure i have my default formatter as prettier .
what exactly happened is that it asked me to configure my formatter out of nowhere i set it to prettier now i m getting wierd colored boxes in the begining of code lines .
Interesting I’m not sure what that is. If I think of anything I’ll let you know.
@@CodingWithAdam thx for the concern, well anyways it was because of indent rainbow extension, i havent installed such ext myself maybe it came as a package with other extension.
Hey, do you know how to disable formatting spaces? I just want prettier to add semicolons and single quotes in javascript files but I don't want it to get rid of extra lines in my code. You'd be a live saver!
Unfortunately prettier is a opinionated formatter with very few options. From there website:
Prettier is not a kitchen-sink code formatter that attempts to print your code in any way you wish. It is opinionated. Quoting the Why Prettier? page:
By far the biggest reason for adopting Prettier is to stop all the ongoing debates over styles.
prettier.io/docs/en/option-philosophy.html
but this formatter is not working for c cpp and java
Sorry to hear that. Prettier does not work for C. You can try this extension for formatting C files. marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
thx bro
You’re welcome!
I can’t even make a js file!!😢😢😢 why it’s your file showing a path to the file like mine is??? What am I doing wrong, what don’t I know that I don’t know???
I don’t see “code formatting” on my left window, all I have is “open editors” and “outline”, how do I get a “code formatting” option or folder over there????
Does anyone know why my HTML is mostly grey and blue, even though I installed and enabled the prettier extension?
Prettier will not change the colors. If you have the wrong file extension it’s possible vscode is not displaying the correct colors.
does prettier support python?
It does not support python. I suggest checking out a formatter for python called black.
marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
Here is a helpful article
code.visualstudio.com/docs/python/formatting
my prettier adds space and slash to the end of my element,
please what can i do to fix this
thanks!!!
You’re welcome!!!
Thanks!
You’re welcome!
thanks🥰
You’re welcome!
thanks for this
You’re welcome!
Thanks gangy
You’re welcome!
Hey can someone tell me that in HTML style if I'm giving curly bracket to a class or Id I'm not getting a line space instead it is showing below to it
Thanks
You’re welcome!
Prettier not working on html file, please help
Try this - Inside the html document right click and select ‘“ormat document with” then select prettier.
you'd be a life saver if you could tell me where the options are to turn off spaces for anonymous functions (before parens). In vscode I turned off the setting but prettier is still over riding the setting and adding a space when saving :(
That's a great question prettier is very opinionated and does not provide many options. I took a look and didn't see anything that could do that. Here is a fun way to explore prettier with an interactive playground. prettier.io/playground/
nice
Thanks!
thxxxxxx very helpfullllll
You’re welcome!
Thank you.
You’re welcome!
💙💙
😀👍
My Prettier is still not autosaving
If it’s not formatting on save I would check if the check box is checked in the settings for format on save.
why doesn't work on python codes,,,please help
Prettier does not support python. I suggest checking out autopep8 or black to format python code.
Here is an article that should help dev.to/eegli/quick-guide-to-python-formatting-in-vs-code-2040
Can someone help, Whenever I save my JS file prettier adds spaces in my operating chaining operator
let weight3 = baas_pokemon?.pickachu?.weight let weight3 = baas_pokemon ? .pickachu ? .weight
please help.