OCaml
OCaml support is available through the OCaml extension.
- Tree-sitter: tree-sitter/tree-sitter-ocaml
- Language Server: ocaml/ocaml-lsp
Setup Instructions
If you have the development environment already setup, skip to Launching Gram
Using Opam
Opam is the official package manager for OCaml and is highly recommended for getting started with OCaml. To get started using Opam, please follow the instructions provided here.
Proceed once opam is installed and you have setup a switch with your development environment as per the instructions.
Launching Gram
Verify that the ocamllsp command line tool for LSP is installed:
ocamllsp --help
If the command is missing or fails to display the help text, revisit the installation instructions for ocamllsp and ensure it's properly installed.
Note: Given how the OCaml package manager works, Gram needs to run from the terminal, so make sure to install the Gram cli.
From a terminal, navigate to an OCaml project and run
gram .
Gram should now be running with OCaml support.