Skip to content

Commit

Permalink
Update roc_ls docs
Browse files Browse the repository at this point in the history
Signed-off-by: Anton-4 <[email protected]>
  • Loading branch information
Anton-4 authored Dec 15, 2023
1 parent 9ba7f0f commit dc677bd
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions crates/lang_srv/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# roc_ls

This is a rudimentary language server for supporting basic editor usage in Roc.
This is a basic language server for Roc.

Support for the following LSP features are provided:




- Inline diagnostics
- Hover support to get types of values
- Hover to view type of value
- Go-to-definition
- <details><summary>Example</summary>

Expand All @@ -29,26 +26,28 @@ Support for the following LSP features are provided:

</details>

Semantic highlighting will also be added soon. Additional features require
[Semantic highlighting](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview#what-is-the-difference-between-syntax-and-semantic-highlighting) will be added soon. Additional features require
changes to the compiler infrastructure that are not yet available.

Note that the language server is a bit naive:
- If you make a change in a dependency, you'll need to also make a change in
the dependents' files for the changes to be picked up
- The language server will only operate on changes that are also reflected on
disk (so save often)
Note that the language server is a bit naïve:
- If you make a change in a dependency, you'll also need to make a change in
the dependents' files for the changes to be picked up.
- The language server will only operate on changes on save, auto-saving is recommended.

## Installing

At this time, only from-source installations of the binary are supported.
The roc_lang_server binary is included with the [nightly releases](https://github.com/roc-lang/roc/releases). We recommend using the same version of roc and roc_lang_server.

### Building from source

Follow the [installation from source](https://github.com/roc-lang/roc/tree/main/getting_started#installation) instructions. Then run
Follow the [building from source](https://github.com/roc-lang/roc/blob/main/BUILDING_FROM_SOURCE.md) instructions for roc. Then run:

```
# do `nix develop` first if you're using nix!
cargo build -p roc_lang_srv --release
```

which will give you a language server binary at
This will give you the language server binary at:

```
target/release/roc_ls
Expand Down

0 comments on commit dc677bd

Please sign in to comment.