I thought "I have to use IntelliJ or STS with Spring Boot even though VS Code is easy to use", so I decided to create a Spring Boot environment with VS Code. I thought, but since there was already a pioneer, it is a reference. Run Spring Boot project in VS Code I mainly write the parts that are not touched there.
From Extensions. Lombok personally.
Maybe this is the main.
Prettier An extension for auto-formatting code. Put it in first. I think that the formatting rules can be decided from the settings, but since there is a lot of trouble, I will put Formatter next.
Formatter
You can search for functions with command + shift + P
on VS Code, so if you search for format there, it will be a candidate.
This is what comes out. If you select this, you will be asked for the format file name, so select it (by default for the time being).
If the specified format file does not exist, you will be asked "Do you want to create a new one?", So Yes.
Then a format file will be created in the project, so open it.
There will be a lot of format settings, so change it to your liking.
Finally, specify the format file in WorkSpace Settings (probably set automatically).
You should be able to format it with this, but I also want it to be automatically formatted when saving.
If you want to format when saving only in Java, go to User Settings
"editor.formatOnSave": false,
"[java]": {
"editor.formatOnSave": true
}
Just list.
There are so many things and so many things that VS Code isn't an IDE anymore? I think.
Recommended Posts