summaryrefslogtreecommitdiffstats
path: root/.devcontainer/devcontainer.json
blob: 0dc303015df5c78ae30a514155bd8a9c259365f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
    "build": {
        "dockerfile": "Dockerfile"
    },
    "onCreateCommand": [
        // Install common tooling.
        "dnf",
        "install",
        "-y",
        "which",
        "zsh",
        "fish",
        // For umask fix below.
        "/usr/bin/setfacl"
    ],
    "updateContentCommand": {
        // Using the shell for `nproc` usage.
        "python": "./configure --config-cache --with-pydebug && make -s -j `nproc`",
        "docs": [
            "make",
            "--directory",
            "Doc",
            "venv",
            "html"
        ]
    },
    "postCreateCommand": {
        // https://github.com/orgs/community/discussions/26026
        "umask fix: workspace": ["sudo", "setfacl", "-bnR", "."],
        "umask fix: /tmp": ["sudo", "setfacl", "-bnR", "/tmp"]
    },
    "customizations": {
        "vscode": {
            "extensions": [
                // Highlighting for Parser/Python.asdl.
                "brettcannon.zephyr-asdl",
                // Highlighting for configure.ac.
                "maelvalais.autoconf",
                // C auto-complete.
                "ms-vscode.cpptools",
                // To view HTML build of docs.
                "ms-vscode.live-server",
                // Python auto-complete.
                "ms-python.python"
            ],
            "settings": {
                "C_Cpp.default.compilerPath": "/usr/bin/clang",
                "C_Cpp.default.cStandard": "c11",
                "C_Cpp.default.defines": [
                    "CONFIG_64",
                    "Py_BUILD_CORE"
                ],
                "C_Cpp.default.includePath": [
                    "${workspaceFolder}/*",
                    "${workspaceFolder}/Include/**"
                ],
                // https://github.com/microsoft/vscode-cpptools/issues/10732
                "C_Cpp.errorSquiggles": "disabled",
                "editor.insertSpaces": true,
                "editor.rulers": [
                    80
                ],
                "editor.tabSize": 4,
                "editor.trimAutoWhitespace": true,
                "files.associations": {
                    "*.h": "c"
                },
                "files.encoding": "utf8",
                "files.eol": "\n",
                "files.insertFinalNewline": true,
                "files.trimTrailingWhitespace": true,
                "python.analysis.diagnosticSeverityOverrides": {
                    // Complains about shadowing the stdlib w/ the stdlib.
                    "reportShadowedImports": "none",
                    // Doesn't like _frozen_importlib.
                    "reportMissingImports": "none"
                },
                "python.analysis.extraPaths": [
                    "Lib"
                ],
                "python.defaultInterpreterPath": "./python",
                "[restructuredtext]": {
                    "editor.tabSize": 3
                }
            }
        }
    }
}