Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make C++ Intellisense work + docker container fixes for it #324

Merged
merged 3 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ RUN apt-get -fy install git vim emacs sudo \
iproute2 procps lsb-release \
bash-completion \
build-essential cmake cppcheck valgrind \
wget curl telnet

wget curl telnet bsdtar
RUN groupadd --gid $USER_GID $USERNAME
RUN useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
RUN chmod 0440 /etc/sudoers.d/$USERNAME

RUN ln -s /usr/bin/clang-format-9 /usr/local/bin/clang-format

RUN mkdir -p /var/downloads
RUN cd /var/downloads
RUN curl -JL https://github.com/microsoft/vscode-cpptools/releases/download/0.27.0/cpptools-linux.vsix | bsdtar -xvf - extension
RUN mkdir -p /home/vscode/.vscode-server/extensions
RUN mv extension /home/vscode/.vscode-server/extensions/ms-vscode.cpptools-0.27.0
RUN chown -R vscode:vscode /home/vscode
18 changes: 9 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"remoteUser": "vscode",
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-vscode.cpptools",
"ms-azuretools.vscode-docker",
"xaver.clang-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"yzhang.markdown-all-in-one",
"eamodio.gitlens",
"yuichinukiyama.vscode-preview-server"
],
"ms-azuretools.vscode-docker",
"xaver.clang-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"yzhang.markdown-all-in-one",
"eamodio.gitlens",
"yuichinukiyama.vscode-preview-server",
"aaron-bond.better-comments"
],
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/settings.json

# Build System
.deps
Expand Down Expand Up @@ -36,4 +37,4 @@ src/include/BuildConfig.h.in
third_party/nlassert/
third_party/nlfaultinjection/
third_party/nlio/
third_party/nlunit-test/
third_party/nlunit-test/
106 changes: 106 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"C_Cpp.intelliSenseEngineFallback": "Enabled",
"C_Cpp.default.includePath": [
"${workspaceFolder}/build/default/src/",
"${workspaceFolder}/build/default/src/**",
"${workspaceFolder}/build/default/src/include/**",
"${workspaceFolder}/build/default/src/lib/**",
"${workspaceFolder}/build/config/standalone/",
"${workspaceFolder}/build/config/standalone/**",
"${workspaceFolder}/src/**",
"${workspaceFolder}/src/include/",
"${workspaceFolder}/src/include/**",
"${workspaceFolder}/src/lib/**",
"${workspaceFolder}/src/system/**",
"${workspaceFolder}/third_party/nlassert/repo/include/**",
"${workspaceFolder}/third_party/nlio/repo/include/**"
],
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they have one for json, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different plugin, happy to put one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which plugin do you use to format, verify tasks.json (et al.)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default built in formatter

},
"files.associations": {
"iostream": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
},
"files.eol": "\n",
"editor.formatOnSave": true,
"better-comments.tags": [
{
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "//",
"color": "#474747",
"strikethrough": true,
"backgroundColor": "transparent"
},
{
"tag": "todo",
"color": "#FF8C00",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "fixme",
"color": "#FF8C00",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"backgroundColor": "transparent"
}
],
"clang-format.fallbackStyle": "WebKit"
}