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

›Setup

Intro

  • What & Why

Setup

  • Installation
  • Editor Plugins

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

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

Extra

  • Frequently Asked Questions
  • Extra Goodies
Translate

Editor Plugins

Reason 天然地对编辑器有很好的支持。我们大多数编辑器插件至少提供了:

  • 展示的种类。
  • 通过 refmt 进行代码格式化。
  • 错误 & 警告显示。
  • 语法高亮。
  • 类型驱动自动补全。
  • 跳转到定义处。

和其他功能。

Editor Plugins & Language Server

Since Reason is just an alternative syntax for OCaml, we integrate seamlessly into the official OCaml editor toolchain as well.

  • 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).
← InstallationOverview →
  • Editor Plugins & Language Server