Emacs major mode for editing Futhark programs
Clone or download
nqpz Revert "Disable show-paren-mode for keywords. Our grammar is too weird."
This disabled too much.  We still want highlighting of parentheses.

This reverts commit cf10189.
Latest commit 27a0345 Jan 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
futhark-dev.el Only hackers need this. Jan 9, 2019
futhark-flycheck.el Refactor. Jan 7, 2019
futhark-mode.el Make it more nice to move let binding lines around. Jan 11, 2019


futhark-mode for Emacs

MELPA Build Status

See the file futhark-mode.el. This Emacs mode provides:

  • syntax highlighting
  • automatic indentation
  • interaction with an inferior futharki process
  • flycheck definition


You can install this mode with Emacs' package manager. Enable the https://melpa.org/ archive, and install the futhark-mode package. Alternatively, add the following lines to your Emacs init file:

(add-to-list 'load-path "path/to/futhark-mode")
(require 'futhark-mode)


This mode is pretty straightforward and does not provide a lot of bells and whistles. But it does have some commands:

  • C-c C-l (futhark-load-file) loads the current file into futharki, creating a new instance if a current one does not exist.

Also consider M-x flycheck-mode to get immediate information about type- and syntax errors (requires installation of the flycheck Emacs package).


Run tools/test-indentation to test if the auto-indentation works. If you find a piece of code that futhark-mode cannot indent properly, please fix it, and put a small example in the tools/test-corpus directory to ensure that it doesn't break in the future.

Note that not all of the indentation examples in tools/test-corpus are necessarily ideal. Some of them exemplify behaviour that we would like to fix (but exist as a regression test to avoid even worse outcomes).

Additionally, you can symlink the tools/git-hooks/pre-commit hook into your local .git/hooks directory to automatically check your changes before each commit.


  • Niels G. W. Serup
  • Rasmus Wriedt Larsen
  • Troels Henriksen

Reloading when hacking on the code

Add the directory containing the .el files to your load path with

(add-to-list 'load-path "/.../futhark-mode")
(require 'futhark-dev)

and then enter M-x RET futhark-dev-reload RET whenever needed.