Next.js Discord

Discord Forum

Is it possible to specify default indent when creating Next.js app?

Unanswered
Chum salmon posted this in #help-forum
Open in Discord
Chum salmonOP
Currently the default indent is 2 when you install Next.js but I want it 4.

Of course I can set my vscode default to 4 but the files generated during Next installation will all be 2 and I'll have to fix them manually which is quite annoying.

9 Replies

Chum salmonOP
I thought the same 😂
@Chum salmon I thought the same 😂
However, you can be faster by using Prettier
Chum salmonOP
Can prettier be configured to only adjust indent and not re-arrage all my code?
I don't think
It wasn't designed for that
I'd still suggest using two spaces, as convention dictates
Hunting wasp
you can try creating your own template with manually set 4 indent and then use it in new projects
Next is a framework, and does not handle formatting.

Use Prettier, Biome, or another formatting tool.