How to run F#


#1

I would like to run F# code in Atom. I have downloaded the Ionide Package, but I don’t know what to do next. Downloading the package seems to have affected nothing. Is there a keyboard command that runs the F# code, or starts the Ionide Package? For example, to run Python, I just press Command r.


#2

This would be a question to ask of the Ionide developers over at the GitHub repo. There’s not a whole lot of documentation about how it’s supposed to work.

atom-runner can handle F#, though. Just point it at the command.


#3

Thank you, I will try the atom-runner. What does it mean to “point it at the command”?


#4

Do you have F# installed?


#5

Yes, I have installed F#


#6

Research indicates that the command for running F# scripts is fsi. So in config.cson, you would want to put

'*':
  'runner':
    'extensions':
      'fs': 'fsi'
      'fsi': 'fsi'
      'fsx': 'fsi'
      'fsscript': 'fsi'
      'ml': 'fsi'
      'mli': 'fsi'

F# has a lot of extensions and I don’t know which ones are needed, so that’s all of them.


#7

Is config.cson somewhere in the settings on Atom?


#8

See the Atom Flight Manual for information on the config.cson and other ways of configuring Atom:

http://flight-manual.atom.io/using-atom/sections/basic-customization/#global-configuration-settings


#9

Okay, thank you very much for your help!