Skip to content

Commit

Permalink
Added vscode settings and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-palmer committed Jan 9, 2024
1 parent 2b416c9 commit 95166c9
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 172 deletions.
70 changes: 0 additions & 70 deletions .devcontainer/nouveau/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,76 +22,6 @@
},
"customizations": {
"vscode": {
"settings": {
"files.associations": {
"*.repos": "yaml",
"*.world": "xml",
"*.xacro": "xml",
"*.srdf": "xml",
"*.rviz": "yaml",
"*.config": "xml",
"*.sdf": "xml"
},
"terminal.integrated.defaultProfile.linux": "bash",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"autoDocstring.startOnNewLine": false,
"autoDocstring.docstringFormat": "google-notypes",
"python.autoComplete.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"python.analysis.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
"C_Cpp.clang_format_fallbackStyle": "Google",
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
"C_Cpp.codeAnalysis.clangTidy.runAutomatically": true,
"clang-format.executable": "/usr/bin/clang-format-14",
"[cpp]": {
"editor.rulers": [100],
"editor.tabSize": 2,
"editor.defaultFormatter": "xaver.clang-format"
},
"[python]": {
"editor.tabSize": 4,
"editor.rulers": [90],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.defaultFormatter": "ms-azuretools.vscode-docker",
"editor.tabSize": 4
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[markdown]": {
"editor.rulers": [80],
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"search.exclude": {
"**/build": true,
"**/install": true,
"**/log": true
}
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
Expand Down
70 changes: 0 additions & 70 deletions .devcontainer/nvidia/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,76 +26,6 @@
},
"customizations": {
"vscode": {
"settings": {
"files.associations": {
"*.repos": "yaml",
"*.world": "xml",
"*.xacro": "xml",
"*.srdf": "xml",
"*.rviz": "yaml",
"*.config": "xml",
"*.sdf": "xml"
},
"terminal.integrated.defaultProfile.linux": "bash",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"autoDocstring.startOnNewLine": false,
"autoDocstring.docstringFormat": "google-notypes",
"python.autoComplete.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"python.analysis.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
"C_Cpp.clang_format_fallbackStyle": "Google",
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
"C_Cpp.codeAnalysis.clangTidy.runAutomatically": true,
"clang-format.executable": "/usr/bin/clang-format-14",
"[cpp]": {
"editor.rulers": [100],
"editor.tabSize": 2,
"editor.defaultFormatter": "xaver.clang-format"
},
"[python]": {
"editor.tabSize": 4,
"editor.rulers": [90],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.defaultFormatter": "ms-azuretools.vscode-docker",
"editor.tabSize": 4
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[markdown]": {
"editor.rulers": [80],
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"search.exclude": {
"**/build": true,
"**/install": true,
"**/log": true
}
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
Expand Down
36 changes: 4 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
# ROS 2
build
install
log
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/opt/ros/iron/include/**",
"/usr/include/gz/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c99",
"cppStandard": "c++20",
"intelliSenseMode": "linux-gcc-x86"
}
],
"version": 4
}
70 changes: 70 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"files.associations": {
"*.repos": "yaml",
"*.world": "xml",
"*.xacro": "xml",
"*.srdf": "xml",
"*.rviz": "yaml",
"*.config": "xml",
"*.sdf": "xml"
},
"terminal.integrated.defaultProfile.linux": "bash",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"autoDocstring.startOnNewLine": false,
"autoDocstring.docstringFormat": "google-notypes",
"python.autoComplete.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"python.analysis.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages/",
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
"C_Cpp.clang_format_fallbackStyle": "Google",
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
"C_Cpp.codeAnalysis.clangTidy.codeAction.formatFixes": true,
"clang-format.executable": "/usr/bin/clang-format-14",
"[cpp]": {
"editor.rulers": [100],
"editor.tabSize": 2,
"editor.defaultFormatter": "xaver.clang-format"
},
"[python]": {
"editor.tabSize": 4,
"editor.rulers": [90],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.defaultFormatter": "ms-azuretools.vscode-docker",
"editor.tabSize": 4
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[markdown]": {
"editor.rulers": [80],
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"search.exclude": {
"**/build": true,
"**/install": true,
"**/log": true
}
}
47 changes: 47 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "ROS 2: Build",
"detail": "Build the workspace using colcon",
"type": "shell",
"command": "colcon build --symlink-install && source install/setup.bash",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"]
},
{
"label": "ROS 2: Test",
"detail": "Run system tests using colcon",
"type": "shell",
"command": "colcon test && colcon test-result --all",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "ROS 2: Create ament_cmake package",
"detail": "Create a new ROS 2 ament_cmake package",
"type": "shell",
"command": "ros2 pkg create --destination-directory src --build-type ament_cmake ${input:packageName}",
"problemMatcher": []
},
{
"label": "ROS 2: Create ament_python package",
"detail": "Create a new ROS 2 ament_python package",
"type": "shell",
"command": "ros2 pkg create --destination-directory src --build-type ament_python ${input:packageName}",
"problemMatcher": []
}
],
"inputs": [
{
"id": "packageName",
"type": "promptString",
"description": "Package name"
}
]
}

0 comments on commit 95166c9

Please sign in to comment.