Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details on how to use this LSP for non-Atom editors #27

Merged
merged 1 commit into from
Dec 29, 2020
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
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# racket-langserver

[Language Server Protocol](http://langserver.org/) implementation for Racket. This project seeks to use DrRacket's public APIs to provide functionality that mimics DrRacket's code tools as closely as possible.
`racket-langserver` is a [Language Server Protocol](http://langserver.org/) implementation for Racket. This project seeks to use [DrRacket](https://github.com/racket/drracket)'s public APIs to provide functionality that mimics DrRacket's code tools as closely as possible.

## Installation
## Installation and usage

Install via the command line with `raco pkg install racket-langserver`
A Racket runtime is a prerequisite, so before using `racket-langserver`, ensure that a Racket runtime is installed. You can install an from the [official download page](https://download.racket-lang.org) or install one from your package manager.

If you plan on using this package with Atom, you should install [atom-ide-racket](https://github.com/cfinegan/atom-ide-racket) instead. This package will be installed automatically by the *atom-ide-racket* installer (although the Racket runtime should be installed prior to this).
### Atom

You can use the [atom-ide-racket](https://github.com/cfinegan/atom-ide-racket) package. The language server will be automatically installed when `atom-ide-racket` installs.

### Other editors and IDEs

First, install an LSP runtime for your editor.

Next, install the package via `raco`:

```
raco pkg install racket-langserver
```

Once it is installed, you can configure your editor to use a custom LSP client for Racket files (`.rkt`), and set the command for the custom client to

```
racket -l racket-langserver
```

You may need to restart your LSP runtime or your editor for `racket-langserver` to start.

## Capabilities

Expand All @@ -18,11 +38,11 @@ If you plan on using this package with Atom, you should install [atom-ide-racket
- *Note:* Currently only considers references within the current file.
- **Document Highlight** (textDocument/documentHighlight)
- **Diagnostics** (textDocument/publishDiagnostics)
- **Code Formatting** (textDocument/formatting & textDocument/rangeFormatting)

#### *Work in Progress:*

- **Document Outline** (textDocument/documentSymbol)
- **Code Formatting** (textDocument/formatting & textDocument/rangeFormatting)

#### *Would be Nice:*

Expand Down