From e28b2f2c748f0a60440554cc4051b79f15bbdbfa Mon Sep 17 00:00:00 2001 From: Osraka <98612432+Osraka@users.noreply.github.com> Date: Sun, 11 Oct 2026 11:45:22 +0300 Subject: [PATCH] docs(formatter): document editor command installation --- tools/bend-fmt-lsp/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/bend-fmt-lsp/README.md b/tools/bend-fmt-lsp/README.md index 7a7a0af91..4824e1b4d 100644 --- a/tools/bend-fmt-lsp/README.md +++ b/tools/bend-fmt-lsp/README.md @@ -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