понедельник, 18 июля 2016 г.

F# in Visual Studio Code

I'm a little bit an IDE-kid and aware of such things like Emacs and Vim however I learned a number of fancy tricks in wonderful Sublime Text and I can edit a line in Vim and then exit it without having an insult. At the same time, I see no point in choosing a text editor over an IDE in my daily works because, you know, performance matters. My performance, not my laptop's (sorry, Greg)
But sometimes you want something different.
From the very beginning I put the great hopes on Visual Studio Code, an Atom editor from Microsoft (but I still feel very uncomfortable with writing code in a web browser). I tried it several times but every time I faced with the fact that I can not literally have anything done with it, because of the weird experience. Finally I found a good reason to deal with the VS Code editor for doing some lightweight F# so I’d like to put my experience on the internet in order to help somebody (mostly future myself) with controlling this editor.
I tried everything on Windows, so obviously setting things up on a Mac or Linux is somewhat different.
Ok, first of all you need to install is a Visual Studio Code itself. It is completely straightforward, check their site for details.
The next important thing is Yeoman scaffolding tool. You’ll need npm for it, check out how to install it. After you’ve done with npm, install yeoman with
npm install -g yo
You will need a F# generator for Yeoman, so do 
npm install -g generator-fsharp
in console to install it.
We will use a wonderful Ionide plugin. Please check prerequisites on their site in Getting Started section.
Then open the VS Code, open plugins section and install the next plugins:
This should be enough to start coding F# in a text editor. Next time we’ll try to build a simple REST service using only Visual Studio Code.

Комментариев нет:

Отправить комментарий