Skip to content

Commit 954e27e

Browse files
committed
preconfigured workspace for vs code
1 parent 5862ecf commit 954e27e

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.cpptools",
4+
"ms-vscode.cpptools-extension-pack",
5+
"llvm-vs-code-extensions.vscode-clangd",
6+
"twxs.cmake",
7+
"ms-vscode.cmake-tools"
8+
]
9+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"clang-format.arguments": [
3+
"-assume-filename=${workspaceFolder}/.clang-format"
4+
],
5+
"editor.rulers": [
6+
120
7+
],
8+
"clangd.arguments": [
9+
"--compile-commands-dir=build/"
10+
],
11+
}

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,18 @@ git rm tests/SumTest.cpp -f
7575
# keep YOURS src, tests, CMakeLists:
7676
git checkout HEAD -- CMakeLists.txt src tests
7777
```
78+
79+
# IDE setup
80+
81+
## CLion
82+
83+
Works out of the box.
84+
85+
## VS Code
86+
87+
1. Install extensions recommended by workspace. You can see them in `.vscode/extensions.json`.
88+
2. Check and adjust `.vscode/settings.json` if needed.
89+
3. Hit `F1` & type `CMake: Build`. If it asks for a toolchain, choose "Unspecified".
90+
4. After build is complete, in the left bar, choose CMake logo. In the tree view, right click on "example_app", choose
91+
"Set as Build Target", and also "Set as Debug Target".
92+
5. `F1` & `CMake: Debug`.

0 commit comments

Comments
 (0)