Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 3.03 KB

CONTRIBUTING.md

File metadata and controls

49 lines (35 loc) · 3.03 KB

If you'd like to help, the best place to start are issues with the following labels:

We follow the issue labels used by Rust which are described in detail here.

If you find something you want to work on, please leave a comment so that others can coordinate their efforts with you. Also, please don't hesitate to open a new issue if you have feedback of any kind.

Discussion

There is an #editorsupport channel on the Reason discord server. If you would like to discuss an idea or need help or have other feedback you can usually find the developers there.

Prerequisites

prerequisite version how to install
Node >= 9.5.0 manually or via package manager
Yarn >= 1.3.2 npm install -g yarn

Building

git clone https://github.com/freebroccolo/ocaml-language-server   # clone the repository
cd ocaml-language-server
yarn install                                                      # install dependencies
node ./bin/server --stdio                                         # start the server (optional)

Debugging the language server with VSCode

It is possible to debug the language server with VSCode, leveraging the debugging tools it provides.

In order to do so:

  1. Clone https://github.com/reasonml-editor/vscode-reasonml and run yarn install
  2. Clone https://github.com/freebroccolo/ocaml-language-server and run yarn install
  3. In the terminal, go to the ocaml-lang-server folder and type npm link
  4. In the terminal, go to the vscode-reasonml folder and type npm link ocaml-language-server. This should make the version of ocaml-language-server in vscode-reasonml/node_modules point to your local version
  5. Open both vscode-reasonml and ocaml-language-server folders in VSCode (you can open a new VSCode window using cmd+shift+n on MacOS or ctrl-shift-n in Windows and Linux)
  6. In vscode-reasonml window, go to "Debug->Start Debugging". This will open a new VSCode window where the vscode-reasonml extension has been replaced with the development one.
  7. In ocaml-language-server window, go to the Debug panel (cmd-shift-d / ctrl-shift-d) and press the Play button at the top: "Attach to process"

At this point, if you want to test for changes, you can run npm run watch in the "Terminal" panel of the ocaml-language-server window, and restart the debugging process in the vscode-reasonml window to test them.