Skip to content

Commit

Permalink
Add links for setup of other editors
Browse files Browse the repository at this point in the history
  • Loading branch information
feihong committed Oct 30, 2024
1 parent ac4e7d6 commit 7e12f37
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions docs/syntaxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,22 @@ extension](getting-started#editor-integration).
### Reason syntax

1. To enable format-on-save in VS Code, open your [User Settings JSON
file](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) and
add this snippet:
file](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson)
and add this snippet:

```json
```json
"[reason]": {
"editor.formatOnSave": true
},
```
```
1. To control how the Reason formatter breaks up long lines, you can also add
this snippet:

```json
"ocaml.server.extraEnv": {
"REFMT_PRINT_WIDTH": "120"
},
```
```
In the snippet above, the print width is set to 120 characters, but you can
use any number you prefer. If you don't set this, the default is 80.

Expand All @@ -182,14 +182,23 @@ add this snippet:
In the snippet above, the print width is set to 120 characters, but you can
use any number you prefer. If you don't set this, the default is 80.
1. To enable format-on-save in VS Code, open your [User Settings JSON
file](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) and
add this snippet:
file](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson)
and add this snippet:

```json
"[ocaml]": {
"editor.formatOnSave": true
},
```
```json
"[ocaml]": {
"editor.formatOnSave": true
},
```

## Other editors

For Reason syntax, check out [Editor
Plugins](https://reasonml.github.io/docs/en/editor-plugins) page from Reason
documentation.

For OCaml syntax, check out the [Editor
Setup](https://ocamlverse.net/content/editor_setup.html) page from OCamlverse.

## Formatters

Expand Down

0 comments on commit 7e12f37

Please sign in to comment.