Skip to content

Commit 44c59c4

Browse files
weihongliang233wenkokke
authored andcommitted
add devcontainer support
1 parent 1824aed commit 44c59c4

4 files changed

Lines changed: 34 additions & 0 deletions

File tree

.devcontainer/.emacs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
;; auto-load agda-mode for .agda and .lagda.md
2+
(setq auto-mode-alist
3+
(append
4+
'(("\\.agda\\'" . agda2-mode)
5+
("\\.lagda.md\\'" . agda2-mode))
6+
auto-mode-alist))

.devcontainer/DockerFile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM haskell:9.8
2+
RUN apt update && apt install emacs -y
3+
RUN cabal update && cabal install Agda-2.6.3

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Agda",
3+
"build" : {
4+
"dockerfile": "DockerFile"
5+
},
6+
"workspaceMount": "source=${localWorkspaceFolder},target=/root/plfa,type=bind",
7+
"workspaceFolder": "/root/plfa",
8+
"postCreateCommand": "bash ./.devcontainer/post-create.sh",
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"banacorn.agda-mode"
13+
]
14+
}
15+
}
16+
}

.devcontainer/post-create.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cd ~/plfa && git submodule update --init --recursive
2+
3+
mkdir ~/.agda
4+
cp ~/plfa/data/dotagda/* ~/.agda
5+
6+
agda-mode setup
7+
agda-mode compile
8+
9+
cat ~/plfa/.devcontainer/.emacs >> ~/.emacs

0 commit comments

Comments
 (0)