1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-26 11:52:13 +03:00
nickel/lsp/README.md

49 lines
1.5 KiB
Markdown
Raw Normal View History

2021-12-13 19:38:30 +03:00
# Nickel Language Server
NLS is a language server for the nickel programming language. NLS offer error messages, type hints, and auto-completion right in your favorite LSP-enabled editor.
2021-12-13 19:38:30 +03:00
## Server
To be editor independent `nls` is made up of two components the server and possible lsp-client configurations that talk to the server directly.
Hence, the server has to be installed separately to the client configuration.
### Installation
The easiest way to install `nls` is using nix. `nls` is installed in the same installation as `nickel`:
To enter a shell with `nickel` and `nls` run
```
nix shell github:tweag/nickel
```
## Client
### VS Code
NLS is currently not available through the vscode marketplace. In the meantime, it can be built using Nix.
2021-12-13 19:38:30 +03:00
Either using the command line (you need to have the [`jq`](https://stedolan.github.io/jq/) command available)
2021-12-13 19:38:30 +03:00
```
code --install-extension $(nix build ./\#vscodeExtension --no-link --json | jq ".[0].outputs.vsix")
```
or in two steps, by first building the extension
```
nix build github:tweag/nickel#vscodeExtension.vsix
```
then installing it using `Extension: Install from VSIX` in the vscode command palette and choosing `./result-vsix/nls-client.vsix`.
#### Configuration
The VS Code extension offers three configuration options:
- `"nls.server.path"`: Path to nickel language server
- `"nls.server.trace"`: "Enables performance tracing to the given file"
- `"nls.server.debugLog"`: "Logs the communication between VS Code and the language server."