Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoddy3190/ocamlformat-vscode-extension
VSCode extension - simple wrapper for ocamlformat command
https://github.com/hoddy3190/ocamlformat-vscode-extension
ocaml ocamlformat vscode vscode-extension
Last synced: about 1 month ago
JSON representation
VSCode extension - simple wrapper for ocamlformat command
- Host: GitHub
- URL: https://github.com/hoddy3190/ocamlformat-vscode-extension
- Owner: hoddy3190
- License: mit
- Created: 2020-06-16T04:15:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:38:33.000Z (about 2 years ago)
- Last Synced: 2024-11-02T07:15:01.814Z (3 months ago)
- Topics: ocaml, ocamlformat, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=hoddy3190.ocamlformat-vscode-extension
- Size: 229 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ocamlformat-vscode-extension README
![](https://github.com/hoddy3190/ocamlformat-vscode-extension/workflows/test/badge.svg)
This extension wraps `ocamlformat` command.
I tested only on OSX, so I don't know it will work on other operating systems.## Features
It enables you to execute `ocamlformat` from Command Palette.
And also enables it on save and on paste if you add the following settings to `settings.json`
```
"editor.formatOnSave": true
"editor.formatOnPaste": true
```## Extension Settings
This extension has the following settings:
- `ocamlformat-vscode-extension.customOcamlformatPath`
- set path to `ocamlformat` command
- if empty, `${OPAM_SWITCH_PREFIX}/bin/ocamlformat` is used. In that case, you have to set path to `opam` command
- `ocamlformat-vscode-extension.ocamlformatOption`
- If multiple, use a comma as delimited string (e.g. ----enable-outside-detected-project,--ocp-indent-config)
- I recommend that you only put options here that you can't put in .ocamlformat
- Note:
- This extension executes ocamlformat and replace file text with its "stdout". So it won't work if you set the following options
- options to change the output destination
- e.g. `--inplace`, `-o` etc.
- options to output something other than formatted code
- e.g. `--help` etc.