Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Update readme #124

Merged
merged 1 commit into from
Apr 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@

# Rescript Editor Support

This is a private command line binary used by [rescript-vscode](https://github.com/rescript-lang/rescript-vscode) to power a few functionalities such as jump to definition, hover and autocomplete.

The binary reads the `.cmt` and `.cmti` files and analyses them.

## Status
## Install

This is a preliminary version for early testing, the CLI is not stable yet.
```
opam switch 4.06.1
opam opam install . --deps-only
```

## Build

```
dune build
```

## Usage

### dump

Compute jump-to-definition and hover information for `Foo.res` at line `0` and column `4`:
The built artifact is in `_build/install/default/bin/rescript-editor-support.exe`

```
rescript-editor-support.exe dump src/Foo.res:0:4
```

### complete
## Usage

Compute autocomplete for `Foo.res` at line `0` and column `4`, where `Foo.res` is being edited and its current content in the editor is in file `Current.res`.
Run:

```sh
_build/install/default/bin/rescript-editor-support.exe --help
```
rescript-editor-support.exe complete src/Foo.res:0:4 Current.res
```


## History