feat: #1: Add DevContainer and EditorConfig.

This commit is contained in:
Fabian 2026-03-08 14:13:01 +00:00
parent 81dfdf5f45
commit e2703d62fd
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,49 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go .
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:2-1.25-trixie",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
"ghcr.io/devcontainers-extra/features/claude-code:1": {},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
"containerEnv": {
"NPM_CONFIG_FUND": "false"
},
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"bierner.markdown-mermaid",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"golang.Go",
"humao.rest-client",
"yzhang.markdown-all-in-one"
],
"settings": {
"chat.agent.enabled": false,
"editor.formatOnSave": true,
"git.openRepositoryInParentFolders": "always",
"telemetry.telemetryLevel": "off",
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "zsh",
"icon": "terminal-bash"
}
}
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
[*.go]
indent_style = tab
indent_size = 4
[go.{mod,sum}]
indent_style = tab
indent_size = 4