Skip to content

Commit

Permalink
style: add development with vscode support
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyamahunt committed Jun 21, 2023
1 parent 915d32c commit 323a94a
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "Swift",
"image": "swift:nightly-5.9-jammy",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided",
"ppa": "false"
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.library": "/usr/lib/liblldb.so"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"sswg.swift-lang",
"vadimcn.vscode-lldb"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8080],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "swift --version",

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"sswg.swift-lang",
"vadimcn.vscode-lldb",
"ms-vscode-remote.vscode-remote-extensionpack"
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files.exclude": {
"**/.build": true,
"**/.swiftpm": true,
"**/.docc-build": true,
"**/node_modules": true,
"Package.resolved": true
}
}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "swift: Build All",
"detail": "swift build --build-tests",
"cwd": ".",
"type": "swift",
"args": [
"build",
"--build-tests"
],
"problemMatcher": [
"$swiftc"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent",
"panel": "shared",
"clear": true
}
}
]
}

0 comments on commit 323a94a

Please sign in to comment.