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.
Actually I can set prettier as a default formatter but then it throws an error that it's not available ....
Рік тому+1
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.
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
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
for more easy way to add semi and singleQuote is adding this code to your settings.json file ) - "editor.formatOnSave": true, "prettier.semi": false, "prettier.singleQuote": true,
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.
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".
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????
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.
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.
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 wish I could help with that I have not encountered that issue. If I come across It I will let you know the solution. If you find the answer please post here to help others.
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/
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! 😁
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!
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!
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 ?
Clear explanation. Thank you
Thank you. You’re welcome!
Explained perfectly.
Thank you!
Nice job with explaining bud. Was very easy to understand.
Thank you! Glad you enjoyed the tutorial!
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!
now i understant how automatic formatiing the code thanks very much
You’re welcome! Glad the tutorial was helpful! 😁
Thank you sir. great explanation video 👍
You’re welcome! Glad the tutorial was helpful!
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.
Thank u so much! That was helpful!
You're welcome! Glad the video was helpful.
Yeah dude, this video nailed it, here is a new sub!
Glad the video helped! Thank you for the Sub!
thanks, this video help me and easy to understand
You’re welcome! Glad the video was easy to understand! 😀
Thanks for the config file and the 'semi' parameter !
You’re welcome!
Smooth language and video good job
Thank you!!! Appreciate the feedback!
Thank you for this, I was wondering if I was doing something wrong.
You’re welcome! I’m glad the video helped!
Thank you! Just what I was looking for.
You’re welcome!
This is a good thing you've done
Thank you!
LOVE YOUUUUU workspace setting i was stucking on it thank you
You’re welcome! I’m glad the tutorial helped! 😁
perfect vedio than others
Thank you! 😁
Thanks Adam, for to the point explanat. 😀
You’re welcome!
Thanks man. It helps me too much !!!
You’re welcome! Glad the tutorial helped!
very helpfull video, thanks bro )
You’re welcome!
Thanks - very clear.
You’re welcome!
Very informative. Thank you
Thank you. You’re welcome!
Thank you :)
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! 😁
very usefull bro! Thanks
You’re welcome! Glad the video was useful.
Thanks
❤
You’re welcome! 😀
awesome Tutorial - Thank you Adam.
You’re welcome! 😁
Big thank you, it was very helpful to me 🌼
You’re welcome! 😀
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 ....
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.
Thanks a lot! Nice tutorial :)
You’re welcome! Glad you enjoyed the tutorial 😁
Great, informative and on point !
Thank You!
Man, you are the best! thank you for this video !
Thank you! I’m glad you enjoyed the video!
Thank u! Great description! =)
You’re welcome! Thank you :)
well explained sir. Thank you! Subscribed
You’re welcome! Thank you for subscribing!
Great video, thanks!
Thank you! You’re welcome!
Thanks for sharing your tutorial. :D
You’re welcome!
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.
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! 😃
Informative! Thanks for sharing your great experience.
You’re welcome! Happy you enjoyed the video!
thank you very much sir
You’re welcome!!!
Amazing video!
Thank you! 😁
Thanks!
You’re welcome!
Thank you!
You’re welcome!
Amazing top video!
Thank you!
Nice and right to the point!
Thanks!
You’re welcome! Glad you liked the video! 😁
Bro thank you very much
You're welcome! Glad the video helped!
Very helpful, thanks.
You’re welcome!
Thank you very much!
Great job! Thanks for help.
Thank you! You're welcome!
Nice video man make more coding tutorials u rock👑💯
Thank you! 😁
Thanks for the help!
You’re welcome!
Thanks for the video :)
You’re welcome!
Good one! Tnx
Thank you! You’re welcome!
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 man, this help full me
You’re welcome!
for more easy way to add semi and singleQuote is adding this code to your settings.json file ) -
"editor.formatOnSave": true,
"prettier.semi": false,
"prettier.singleQuote": true,
Thanks for the tip!
thanks🥰
You’re welcome!
Thank you ❤️
You’re welcome! 😀
thanks , it worked for me :)
You're welcome!
thank you man
You’re welcome!
my prettier adds space and slash to the end of my element,
please what can i do to fix this
Thank you🎉
You’re welcome 😁
Great one :)
Thank you!
Amazing video
Thank you! 😁
Thanks alot.
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.
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.
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
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????
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
Appreciate it!
You’re welcome!
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.
Thanks gangy
You’re welcome!
thanks for this
You’re welcome!
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.
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.
Thanks man
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.
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!
thanks!!!
You’re welcome!!!
Thank you.
You’re welcome!
Nice Video
Thank you!
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
thxxxxxx very helpfullllll
You’re welcome!
💙💙
😀👍
Thanks for video tutorijal, I'm subscribe, like and share. Bay.
You’re welcome! Thank you for subbing liking and sharing 😁
thanks man!
You're Welcome!
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
My c File code is not formatted...
Unfortunately prettier does not support c files.
Why my vscode does not have the option of "format with ..." when right click? Thanks.
I wish I could help with that I have not encountered that issue. If I come across It I will let you know the solution. If you find the answer please post here to help others.
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/
Have i told you i love you great content we should collab