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).