diff --git a/Documentation/CLionConfiguration.md b/Documentation/CLionConfiguration.md index ddc3cd28165..2ea12fb0c92 100644 --- a/Documentation/CLionConfiguration.md +++ b/Documentation/CLionConfiguration.md @@ -16,7 +16,7 @@ After opening the `serenity` repository in CLion as a new project, the "`Open Pr > _If you have not built the Toolchain at this point, please do so: `./Toolchain/BuildIt.sh`_ -If you already have the project open, you can go to "`File->Settings->Build, Execution, Deployment->Cmake`" to find these options. +If you already have the project open, you can go to `File -> Settings -> Build, Execution, Deployment -> CMake` to find these options. Remember to recreate the CMake cache after changing any of the options. @@ -30,6 +30,16 @@ want exclude Toolchain files as well, follow the same procedure with the followi - `Toolchain/Tarballs` - `Toolchain/Build` +## Code Generation Settings + +To make code generated by CLion (e.g. identifier names, const placement) match the SerenityOS coding style, change the +following options under `Settings -> Editor -> Code Style -> C/C++`: + +- On the `Code Generation` tab set `const/volatile qualifier placement` to `int const x = 0` +- On the `Naming Convention` tab, select the following: + + ![Screenshot of Naming Convention settings](./CLion_Naming_Convention.png) + ## Notes for WSL Users It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides. diff --git a/Documentation/CLion_Naming_Convention.png b/Documentation/CLion_Naming_Convention.png new file mode 100644 index 00000000000..c7e437ed0e5 Binary files /dev/null and b/Documentation/CLion_Naming_Convention.png differ