Skip to content

Commit

Permalink
chore: use separated .vscode for buildenv
Browse files Browse the repository at this point in the history
- Mount separated .vscode for buildenv to allow users to use custom
configuration
- Update vscode configuration to use clang tools
  • Loading branch information
mogaika committed Jan 14, 2024
1 parent e2b7e03 commit 96dc12d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 30 deletions.
20 changes: 0 additions & 20 deletions .vscode/settings.json

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,18 @@ Here are some nice plugins to work with this repo:
"extensions": [
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"GitHub.copilot",
"GitHub.copilot-chat",
"golang.go",
"jkillian.custom-local-formatters",
"ms-azuretools.vscode-docker",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes",
"ms-vscode.makefile-tools",
"twxs.cmake"
]
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"twxs.cmake",
],
}
```
2 changes: 2 additions & 0 deletions hack/buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -o errexit
set -o nounset
set -o pipefail
set -o errtrace
set -x

cd "$(dirname "${BASH_SOURCE}")/.."

Expand Down Expand Up @@ -62,6 +63,7 @@ function docker_buildenv {
docker run --rm --name "${name}" --shm-size 1024m \
${priv} \
-v $PWD:/src:delegated -v $PWD/vpp-out:/vpp-out \
-v ${PWD}/hack/vscode-buildenv:/src/.vscode \
"${opts[@]}" -w /src "${DEV_IMAGE}" "$@"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"/vpp-src/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"compilerPath": "/usr/bin/clang-11",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-gcc-x64",
"intelliSenseMode": "linux-clang-x64",
"configurationProvider": "ms-vscode.makefile-tools"
}
],
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions hack/vscode-buildenv/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"editor.indentSize": 2,
"editor.tabSize": 2,
"editor.insertSpaces": true,
}
File renamed without changes.
5 changes: 0 additions & 5 deletions hack/vscode-format.sh

This file was deleted.

0 comments on commit 96dc12d

Please sign in to comment.