2017-11-29

dotnet new vscode

F# is a functional-first language that can target both .NET and JavaScript platforms. VS Code is built on the JavaScript platform and has a thriving extension platform. It has become my preferred programming environment for multiple languages and I'd love to be able to easily create my own extensions using F#. I just created a dotnet template named vscode so we can.

Quick Start

quickstart.ps1 loading ...
F5 to build, run, and debug
ctrl + shift + p to run Hello World command

Quick Video Demo


Code

Here is the F# port of the Example - Hello World for the VS Code docs and included in the template:
extension.fs loading ...

ts2fable 0.5 now generates bindings with the parameter comments too. This binding are generated by a local ts2fable in the postinstall hook of package.json. If you change the vscode engine version in package.json, the bindings will be updated to reflect the new version.


Credits

Thank you to Alain Cormier for the initial code that I imported and updated. Many thank to Krzysztof Cieślak for the VS Code extension Ionide, which is written using Fable. Take a look at the source code there if you need ideas for what can be done. I'm hoping we see lots of Fable in this year's F# Advent Calendar. Happy hacking!