Skip to content
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
17 changes: 14 additions & 3 deletions tools/bend-fmt-lsp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ completion, hover, range-formatting, or on-type-formatting features.

## Install and run

Node.js 22 or newer is required.
Node.js 22 or newer is required. From the repository root:

```sh
npm install
cd tools/bend-fmt-lsp
npm ci
npm run build
node dist/server.js --stdio
```

To run the server directly from this checkout, use `node dist/server.js --stdio`.
To use the editor configurations below, install the built package as a command:

```sh
npm install -g .
```

Run this from `tools/bend-fmt-lsp` after building. Without the global install,
configure your editor to run `node` with the absolute path to `dist/server.js`
and `--stdio` instead.

The server handles documents whose language ID is `bend` or `bend2`. It
preserves line breaks, blank lines, comments, literal spelling, line endings,
and the final-newline state. Formatting normalizes indentation and safe token
Expand Down