-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdevcontainer.json
More file actions
129 lines (129 loc) · 6.25 KB
/
devcontainer.json
File metadata and controls
129 lines (129 loc) · 6.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"build": {
// Installs latest version from the Distribution
"dockerfile": "./${localEnv:DEVCONTAINER_DOCKERFILE_NAME:Dockerfile}",
"context": "../../../",
"args": {
"HTTP_PROXY": "${localEnv:HTTP_PROXY}",
"HTTPS_PROXY": "${localEnv:HTTPS_PROXY}",
"http_proxy": "${localEnv:http_proxy}",
"https_proxy": "${localEnv:https_proxy}",
"NO_PROXY": "${localEnv:NO_PROXY}",
"no_proxy": "${localEnv:no_proxy}"
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils": {
// Installs latest version from the Distribution
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "false" // WARNING: do *not* enable; this would include packages also from other features, which may have been pinned to a specific version
},
"ghcr.io/devcontainers-community/features/llvm": {
// Full semantic version pinning does not work with this feature.
// In case we want this, the feature needs to be replaced with a custom installation script.
"version": "20"
},
"./s-core-local": {},
"./bazel-feature": {}
},
"overrideFeatureInstallOrder": [
// this order makes it more convenient to develop the local features, since they will be installed last
// which means changes to it will be applied without needing to rebuild all other features
"ghcr.io/devcontainers/features/common-utils",
"ghcr.io/devcontainers-community/features/llvm",
"./s-core-local",
"./bazel-feature"
],
"remoteUser": "vscode",
"customizations": {
"vscode": {
"extensions": [
"usernamehw.errorlens",
"lextudio.restructuredtext",
"ms-python.python",
"charliermarsh.ruff",
"mads-hartmann.bash-ide-vscode",
"matepek.vscode-catch2-test-adapter",
"bazelbuild.vscode-bazel", // Bazel support for Visual Studio Code; see also bazel.lsp.command below
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"ms-vscode.live-server", // live preview of HTML files
"llvm-vs-code-extensions.vscode-clangd",
"jebbs.plantuml", // preview PlantUML diagrams
"hediet.vscode-drawio", // Draw.IO integration
"swyddfa.esbonio", // for Sphinx documentation support
"rust-lang.rust-analyzer", // Rust language support for Visual Studio Code; see also tasks below
"github.vscode-pull-request-github", // GitHub integration
"bierner.markdown-preview-github-styles", // GitHub style for Markdown preview
"ms-sarifvscode.sarif-viewer" // CodeQL report viewer
],
"settings": {
"files.insertFinalNewline": true,
"editor.formatOnSave": false,
"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"clangd.path": "/usr/bin/clangd",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}/",
"--pretty",
"--background-index"
],
"bazel.lsp.command": "/usr/local/bin/starpls", // use the Starlark Language Server for Bazel projects
"bazel.lsp.args": [
"server", // see https://github.com/withered-magic/starpls/issues/400#issuecomment-3095469671 - this is "what developers expect"
"--experimental_infer_ctx_attributes",
"--experimental_use_code_flow_analysis",
"--experimental_enable_label_completions"
],
// we are NOT installing the codeql extension, because this is only needed for codeql rule development,
// but just in case someone wants to use it, we preconfigure it here
"codeQL.runningQueries.numberOfThreads": 0, // use all available threads, I can't believe this is not the default
"codeQl.cli.executablePath": "$CODEQL_HOME/codeql",
"C_Cpp.intelliSenseEngine": "disabled",
// This only supports basic tests: https://github.com/matepek/vscode-catch2-test-adapter/issues/429
// More complex tests may need execution via bazel, which is not done yet.
"testMate.cpp.test.executables": "bazel-bin/**/*{test,Test,TEST}*",
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "Run bazel-compile-commands",
"command": "bazel-compile-commands",
"type": "shell",
"isBackground": true,
"hide": true
},
{
"label": "Update compile_commands.json",
"command": "${command:clangd.restart}",
"isBackground": true,
"dependsOn": [
"Run bazel-compile-commands"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{ // see https://bazelbuild.github.io/rules_rust/rust_analyzer.html#vscode
"label": "Update rust-project.json",
"command": "bazel",
"args": [
"run",
"@rules_rust//tools/rust_analyzer:gen_rust_project"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": "build"
}
]
}
}
}
}
}