I'm using prettier + esling in my vscode.
I can't find some settings. I don't know what to descrive so here's some example code.
void set()
{
::n = 10;
}
void set() {
::n = 10;
} // I prefer this way
and when i'm using namespace in c++
namespace example
{
int n;
void set()
{
doodle::n = 20;
}
} // namespace example
namespace example
{
int n;
void set()
{
doodle::n = 20;
}
} // namespace example
can you help me with this settings? thanks.
Welcome to Stack Overflow.
Prettier is an "opinionated" formatter, which means that it does not provide many customization settings -- it just formats code the way it thinks code should look.
You may wish to uninstall or disable Prettier, and simply use the formatting settings natively present in VSCode, accessible from preferences
.
Or, you can search the VSCode Marketplace for a C++ formatter with more customization options: https://marketplace.visualstudio.com/