├── .gitignore ├── helloworld.cr ├── .vscode └── launch.json ├── .devcontainer ├── devcontainer.json └── Dockerfile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | bin 3 | -------------------------------------------------------------------------------- /helloworld.cr: -------------------------------------------------------------------------------- 1 | puts "Hello World" 2 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.1.0", 6 | "configurations": [ 7 | { 8 | "name": "Crystal: Current File", 9 | "type": "cr", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crystal", 3 | "build": { 4 | "context": "..", 5 | "dockerfile": "Dockerfile", 6 | }, 7 | 8 | // Set custom container specific settings.json values on container create 9 | "settings": { 10 | "terminal.integrated.shell.linux": "/bin/bash", 11 | "terminal.integrated.inheritEnv": false, 12 | }, 13 | 14 | // Add the IDs of extensions you want installed when the container is created 15 | "extensions": [ 16 | "crystal-lang-tools.crystal-lang", 17 | "veelenga.crystal-ameba", 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM crystallang/crystal 2 | 3 | # crystalline 4 | 5 | RUN \ 6 | apt-get update -y && \ 7 | apt-get install -y wget 8 | 9 | RUN \ 10 | wget https://github.com/elbywan/crystalline/releases/latest/download/crystalline_linux.gz -O crystalline.gz && \ 11 | gzip -d crystalline.gz && \ 12 | chmod u+x crystalline && \ 13 | cp crystalline /usr/bin 14 | 15 | # ameba 16 | 17 | RUN \ 18 | git clone https://github.com/crystal-ameba/ameba && \ 19 | cd ameba && \ 20 | make install 21 | 22 | # zsh 23 | 24 | # RUN \ 25 | # apt-get update -y && \ 26 | # apt-get install -y zsh curl 27 | 28 | # ENV SHELL /bin/zsh 29 | 30 | # RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 31 | 32 | # RUN git clone https://github.com/veelenga/crystal-zsh.git ~/.oh-my-zsh/custom/plugins/crystal 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [VS Code development container](https://github.com/microsoft/vscode-dev-containers) for the [crystal](https://crystal-lang.org/). 2 | 3 | You can check that first link for the full details of how to get set up to use VS Code development containers, but the gist of it is: 4 | 5 | 1. Install [Docker](https://docs.docker.com/get-docker/). 6 | 2. Install the [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack). 7 | 3. Clone this repo. 8 | 4. In VS Code, either: 9 | - "Open folder..." the cloned repo, then click the "Reopen in container" button that appears in the lower right. 10 | OR 11 | - F1 and "Remote-Containers: Open Folder in Container..." the cloned repo. 12 | 5. In VS Code, open a New Terminal from the Terminal menu. 13 | 14 | ## Resources 15 | 16 | https://github.com/veelenga/awesome-crystal --------------------------------------------------------------------------------