// SPDX-License-Identifier: PMPL-1.0-or-later
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
//
// Dev Container configuration for anvomidaviser
// Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod
// Container runtime: Podman (recommended) or any OCI-compliant runtime
{
  "name": "anvomidaviser",

  "build": {
    "dockerfile": "Containerfile",
    "context": ".."
  },

  "features": {
    "ghcr.io/devcontainers/features/git:1": {
      "ppa": false,
      "version": "latest"
    },
    "ghcr.io/jdx/devcontainer-features/just:1": {},
    "ghcr.io/nickel-lang/devcontainer-feature:0": {}
  },

  "postCreateCommand": "just deps",

  "remoteUser": "nonroot",

  "containerEnv": {
    "EDITOR": "code --wait",
    "LANG": "C.UTF-8"
  },

  "customizations": {
    "vscode": {
      "extensions": [
        "EditorConfig.EditorConfig",
        "eamodio.gitlens",
        "streetsidesoftware.code-spell-checker",
        "timonwong.shellcheck",
        "tamasfe.even-better-toml",
        "skellock.just",
        "redhat.vscode-yaml",
        "DavidAnson.vscode-markdownlint",
        "asciidoctor.asciidoctor-vscode",
        "usernamehw.errorlens"
      ],
      "settings": {
        "editor.formatOnSave": true,
        "editor.insertSpaces": true,
        "editor.tabSize": 2,
        "files.trimTrailingWhitespace": true,
        "files.insertFinalNewline": true,
        "files.trimFinalNewlines": true,
        "[makefile]": {
          "editor.insertSpaces": false
        }
      }
    },
    "codespaces": {
      "openFiles": [
        "README.adoc"
      ]
    }
  },

  "forwardPorts": [],

  "shutdownAction": "stopContainer"
}
