Reason
  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages iconEnglish
    • 日本語
    • Deutsch
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Русский
    • Українська
    • 中文
    • 繁體中文
    • Help Translate
  • GitHub

›Setup

Intro

  • What & Why
  • Getting started

Setup

  • Installation
  • Editor Plugins
  • Format (refmt)

Language Basics

  • Overview
  • Let Bindings
  • Primitives
  • Basic Structures
  • Types
  • Records
  • Variants
  • Options and nullability
  • Functions
  • Recursion
  • Destructuring
  • Pattern Matching
  • Mutable Bindings
  • Loops
  • Modules

Advanced Features

  • JSX
  • External
  • Exception
  • Object

JavaScript

  • Melange
  • Interop
  • Syntax Cheatsheet
  • Pipe First
  • Promise
  • Libraries
  • Converting from JS

Extra

  • Frequently Asked Questions
  • Extra Goodies
  • REPL (rtop)
Edit

Editor Plugins

Reason's nature lends itself to great editor support. Most of our editor plugins provides at minimum:

  • Types display.
  • Programmatic code formatting through refmt.
  • Errors & warnings display.
  • Syntax highlighting.
  • Type-driven autocomplete.
  • Jump to definition.

And other features.

Editor Plugins & Language Server

The OCaml Platform provides support for Reason and integrates with editors such as VSCode, Vim, or Emacs.

  • For VSCode, we recommend using the vscode-ocaml-platform plugin, which offers OCaml & Reason support out of the box.
  • For other editors, we recommend using a language server client plugin of your choice, and pairing it with the ocaml-lsp. Check out the respective README's to get started.

Other:

  • Vim/Neovim: Make sure to use ocaml-language-server for native development as suggested. (Mac, Linux): npm install -g ocaml-language-server
  • vim-reasonml: For use with esy, Reason, and Merlin (not LSP based). (Mac, Linux, Windows).
  • Sublime Text
  • IDEA
← InstallationFormat (refmt) →
  • Editor Plugins & Language Server