On Ubuntu, install the racket package with:
sudo apt-get install racket
On Arch Linux, install racket with:
sudo pacman -S racket
On Windows, install Racket from racket-lang.org. Put Racket.exe and Raco.exe on your path.
Once Racket is installed, you need to install the plai-typed language. To do this, run: raco pkg install plai-typed
in the console.
Make a folder .emacs.d
in your home folder. Create a file init.el
there and copy the contents of the file below in. This config provides the following packages:
- ido - Ido mode provides an interative file find interface.
- smex - Smart MEta-X provides an ido-like interface to M-X.
- racket-mode - Provides racket syntax highlighting, REPL, and autocompletion backend.
- flycheck - Provides on-the-fly syntax checking and error highlighting.
- company - Provides popups for completions. Complete with tab or enter, switch between with up/down.
- paredit - Autoinserts closing parens, adds a lot of features for editing racket-style code. For a tutorial, the nice gif-filled guide here.
- rainbow-delimiters - Colorizes parenthesis, brackets, and other delimiters to make it easier to tell what matches with what.
- uniquify - Helps make buffer names unique. If you open two files with the same name, it can be hard to tell the difference. This fixes that.
To get completions with specific things from your code, you need to run the file through the REPL first. To do this, either click Racket->Run->In REPL, or press CTRL+C, CTRL+K. Completions can take a second or two to pop up after you start typing.