Skip to content

Commit d3acbf2

Browse files
committed
vscode dotfiles
1 parent b263964 commit d3acbf2

File tree

3 files changed

+38
-66
lines changed

3 files changed

+38
-66
lines changed

.vscode/c_cpp_properties.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"configurations": [
33
{
44
"name": "Mac",
5-
// "compileCommands": "${workspaceFolder}/compile_commands.json",
5+
"compileCommands": "${workspaceFolder}/compile_commands.json",
66
"includePath": [
7-
"${workspaceFolder}/**",
8-
"${workspaceFolder}/src/include",
9-
"${workspaceFolder}/third_party/**",
10-
"${workspaceFolder}/bazel-00_C_Repo_Template/external/**/*",
7+
"${workspaceFolder}/apps/**/include",
8+
"${workspaceFolder}/apps/**/src",
9+
"${workspaceFolder}/tests/**",
10+
"${workspaceFolder}/third_party/**"
1111
],
1212
"defines": [],
1313
"macFrameworkPath": [],

.vscode/settings.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
{
22
"clangd.arguments": [
33
// Allow clangd to execute your compiler to find system headers. I've seen strange errors when this is enabled, so it might be worth trying without it.
4-
"--query-driver=/**"
4+
"--query-driver=/**",
5+
"--background-index",
6+
"--clang-tidy",
7+
"--header-insertion=never",
8+
"--compile-commands-dir=${workspaceFolder}"
59
],
10+
"C_Cpp.intelliSenseEngine": "Disabled",
11+
"C_Cpp.errorSquiggles": "Disabled",
12+
"C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json",
13+
"files.exclude": {
14+
"bazel-bin": true,
15+
"bazel-out": true,
16+
"bazel-testlogs": true,
17+
"bazel-00_C_Repo_Template": true
18+
},
19+
"search.exclude": {
20+
"bazel-bin": true,
21+
"bazel-out": true,
22+
"bazel-testlogs": true,
23+
"bazel-00_C_Repo_Template": true
24+
}
625
}

.vscode/tasks.json

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "Bazel Build (Debug)",
5+
"label": "Bazel Run (Debug)",
66
"type": "shell",
77
"command": "bazel run ${relativeFileDirname}:${fileBasenameNoExtension} -c dbg --spawn_strategy=local",
88
"group": "build"
99
},
10+
{
11+
"label": "Bazel Build (Debug)",
12+
"type": "shell",
13+
"command": "bazel build ${relativeFileDirname}:${fileBasenameNoExtension} -c dbg",
14+
"group": "build"
15+
},
1016
{
1117
"label": "Bazel Build",
1218
"type": "shell",
@@ -26,72 +32,19 @@
2632
"group": "build"
2733
},
2834
{
29-
"label": "C/C++: gcc-11 Aktive Datei kompilieren",
35+
"label": "Bazel Refresh Compile Commands",
3036
"type": "shell",
31-
"command": "/opt/homebrew/bin/gcc-11",
32-
"args": [
33-
"-fdiagnostics-color=always",
34-
"-g",
35-
"${file}",
36-
"-o",
37-
"${fileDirname}/${fileBasenameNoExtension}"
38-
],
39-
"options": {
40-
"cwd": "${fileDirname}"
41-
},
42-
"problemMatcher": [
43-
"$gcc"
44-
],
45-
"group": {
46-
"kind": "build",
47-
"isDefault": true
48-
},
37+
"command": "bazel run //:refresh_compile_commands"
4938
},
5039
{
40+
"label": "Bazel Coverage HTML",
5141
"type": "shell",
52-
"label": "C: clang build active file",
53-
"command": "/usr/bin/clang",
54-
"args": [
55-
"-std=c11",
56-
"-stdlib=libstdc++",
57-
"-g",
58-
"${file}",
59-
"-o",
60-
"${fileDirname}/${fileBasenameNoExtension}"
61-
],
62-
"options": {
63-
"cwd": "${workspaceFolder}"
64-
},
65-
"problemMatcher": [
66-
"$gcc"
67-
],
68-
"group": {
69-
"kind": "build",
70-
"isDefault": true
71-
}
42+
"command": "bazel run //:coverage_html"
7243
},
7344
{
45+
"label": "Bazel Format",
7446
"type": "shell",
75-
"label": "C++: clang++ build active file",
76-
"command": "/usr/bin/clang++",
77-
"args": [
78-
"-std=c++17",
79-
"-stdlib=libc++",
80-
"-g",
81-
"${file}",
82-
"-o",
83-
"${fileDirname}/${fileBasenameNoExtension}"
84-
],
85-
"options": {
86-
"cwd": "${workspaceFolder}"
87-
},
88-
"problemMatcher": [
89-
"$gcc"
90-
],
91-
"group": {
92-
"kind": "build",
93-
"isDefault": true
94-
}
47+
"command": "bazel run //tools/format:format"
9548
}
9649
]
9750
}

0 commit comments

Comments
 (0)