F# on Emacs with Spacemacs
25 April 2015
While F# is first-class citizen in Visual Studio, there’s also support for text editors:
- via fsharp/fsharpbinding for Emacs, Vim, and Sublime Text
- via Krzysztof-Cieslak/FSharp.Atom for Atom
Beyond Visual Studio
In my experience so far, getting F# to work outside Visual Studio requires quite an effort.
There are always a couple of steps to be done, and basic knowledge of the target text editor is also assumed.
A flexible, easy way, with Spacemacs
I learned Spacemacs in a tweet by Chris Bowdon. Spacemacs is essentially an Emacs configuration.
Open a Git Bash command prompt window:
Then, launch Emacs and Spacemacs will automatically load, installing all required packages. After that, Emacs must be restarted.
After opening Emacs, it should show
~/.spacemacs under Recent files. – Click on that file to open it.
Add F# as shown in the following diff-output:
Then hit CTRL+C & CTRL+C, and the Spacemacs layer for F# will install itself.
The F# projects shown in the above screenshots are Qaiain and DiamondFsCheck.