Partager via


F# Emacs Integration

 

The F# Open Source Group has developed a super-powerful F# Emacs mode, including Intellisense auto-completion, errors-in-current-file, go-to-definition and tooltip support for types/documentation for functions etc. This brings much of the power of F# visual editing to a more traditional (and very widely used) text-editor environment, across multiple platforms, and supports F# 3.0 including type providers etc.

The work is nearing the end of the prototype phase and I'd encourage those of you who use Emacs (or might need to at some point) to give it a whirl, and to contribute to the work as well (if it has a problem, fix it!). The work is done by Robin Neatherway, who is one of the winners of the 2011 ICFP Programming Contest using F#, and an all-round super guy.

Here are the latest notes from Robin:

Hi all,

I have prototyped a completion integration for Emacs as part of fsharp-mode. Based on Laurent and Tomas' work, I have extended the FSharp.AutoComplete tool to handle F# projects and interact with it from fsharp-mode to offer completion suggestions. This is a minimal working prototype that I am looking for feedback on.

You can currently find the code at https://github.com/rneatherway/fsharpbinding. (It will be merged into the main fsharp repository once I'm happy with the stability).

 In the 'emacs' directory, you can find

https://github.com/rneatherway/fsharpbinding/tree/master/README.md

https://github.com/rneatherway/fsharpbinding/tree/master/README-intellisense.md

with guidelines for the (easy) installation. Note that you do have to compile FSharp.AutoComplete and either make sure the binary is on your PATH or place it in a "bin" subdirectory of the fsharp mode .el files. xbuild FSharp.AutoComplete.fsproj does the trick on Mono 3.0.  

Completion is using `completion-at-point` at the moment and can be invoked using `C-M-i`. Feel free to bind another key. It is a little slow at the moment, especially on the first completion. Parsing requests need to be sent to the background process during idle periods, for example.

Currently unimplemented, but on my radar:

* Completion on dot ('.')

* Errors in current file (a la VS squiggly underlining)

* Jump to definition

* Tooltip support with types of functions etc 

Thanks,

Robin

Comments

  • Anonymous
    January 18, 2013
    awesome, I try it now!

  • Anonymous
    January 24, 2013
    Will F# be part of SSIS scripting language? sqlserverrider.wordpress.com

  • Anonymous
    January 25, 2013
    Will F# be part for SSIS scripting language?

  • Anonymous
    February 05, 2013
    Expecting a vim plugin too!

  • Anonymous
    February 20, 2013
    Expecting a C# emacs plugin but F# is still awesome.