Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ffc1b9c
add declaration, documentHighlight, prepareRename
montymxb Nov 9, 2026
289e32a
add rangeFormatting, onTypeFormatting
montymxb Nov 9, 2026
0f3b6f4
add foldingRange, selectionRange, documentLink, codeLens, inlayHint
montymxb Nov 9, 2026
e207430
add semantic tokens full, range, delta
montymxb Nov 9, 2026
c57a284
add workspaceSymbol
montymxb Nov 9, 2026
8b3d688
add call hierarchy and type hierarchy
montymxb Nov 9, 2026
d8c1eb1
add pull diagnostics and saveDocument
montymxb Nov 9, 2026
0e24f67
fix: addRegisteredLanguage stored extension mapping backwards
montymxb Nov 9, 2026
bf9a7ba
changelog: unreleased LSP command additions
montymxb Nov 9, 2026
3bf7b46
answer server-to-client refresh, progress, showMessageRequest, applyE…
montymxb Nov 9, 2026
0228a4f
integration: cover new methods minilogo supports, skip the rest
montymxb Nov 9, 2026
1808905
integration: add Langium grammar LS suite, fix stop() never force-kil…
montymxb Nov 9, 2026
fe8105c
codeAction: also match diagnostic codes carried in data.code
montymxb Nov 9, 2026
a28c639
add resolve request helpers, note Langium suite in CI
montymxb Nov 9, 2026
ad4fb91
track document text on edit, honor server save sync options, add will…
montymxb Nov 9, 2026
ae0033e
examples: showcase new BenchContext methods
montymxb Nov 9, 2026
b0bebc4
release prep: v0.2.0, docs and changelog refresh
montymxb Nov 9, 2026
1bf19df
changelog: correct note on prior server request handling
montymxb Nov 9, 2026
df2e8a0
some proofing
montymxb Nov 9, 2026
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:
- name: Install dependencies
run: npm ci

# clones, installs, and builds the minilogo language server, then drives it
# over stdio via the built lsbench harness
- name: Integration test (minilogo language server)
# clones, installs, and builds the minilogo language server, starts the Langium
# grammar language server from devDependencies, and drives both over stdio
# via the built lsbench harness
- name: Integration test (minilogo + Langium grammar language servers)
run: npm run test:integration
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# CHANGELOG

## v0.2.0

Adds most remaining LSP requests to `BenchContext`, server-aware save handling, answers for common server to client requests, and a second integration suite against Langium's grammar language server.

### New BenchContext methods

- **Navigation:** `declaration`, `documentHighlight`, `prepareRename`
- **Formatting:** `rangeFormatting`, `onTypeFormatting`
- **Document structure:** `foldingRange`, `selectionRange`, `documentLink`, `codeLens`, `inlayHint`
- **Semantic tokens:** `semanticTokensFull`, `semanticTokensRange`, `semanticTokensDelta`
- **Workspace symbols:** `workspaceSymbol`
- **Call/type hierarchy:** `prepareCallHierarchy`, `callHierarchyIncomingCalls`, `callHierarchyOutgoingCalls`, `prepareTypeHierarchy`, `typeHierarchySupertypes`, `typeHierarchySubtypes`
- **Pull diagnostics:** `documentDiagnostic`, `workspaceDiagnostic`. The `textDocument.diagnostic` client capability is intentionally not advertised, since some servers switch from push to pull diagnostics when it is present, which would break `waitForDiagnostics`.
- **Resolve:** `completionItemResolve`, `codeActionResolve`, `codeLensResolve`, `inlayHintResolve`, `documentLinkResolve`, `workspaceSymbolResolve`
- **Document lifecycle:** `saveDocument`, `willSave`, `willSaveWaitUntil` (timed)

### Save handling

- Save related sync options are read from the static `textDocumentSync` capability and from dynamic registrations of `textDocument/didSave`, `textDocument/willSave` and `textDocument/willSaveWaitUntil`. A bare `TextDocumentSyncKind` number implies `didSave` without text, matching `vscode-languageclient`. They are available via `LspHarness.saveSyncOptions()`, and `SaveSyncOptions` is exported.
- `saveDocument` only sends `didSave` when the server wants it, and includes the current document text when it asks for `includeText`. `willSave` is also only sent when wanted, while `willSaveWaitUntil` is always sent since it is timed.

### Server to client requests

- Refresh requests (`workspace/semanticTokens/refresh`, `inlayHint/refresh`, `codeLens/refresh`, `inlineValue/refresh`, `diagnostic/refresh`) and `window/workDoneProgress/create` are acknowledged.
- `window/showMessageRequest` is dismissed with `null`, and `workspace/applyEdit` is declined with `applied: false`.
- `client/unregisterCapability` is now handled.

Previously these were rejected with a JSON-RPC `MethodNotFound` error, which some servers log noisily or handle poorly.

### Client capabilities

- Advertises capabilities for every new request, including `codeAction` `dataSupport` and `resolveSupport`, `inlayHint` and workspace symbol `resolveSupport`, semantic token requests (full, delta, range), and `linkSupport` for declaration.

### Behavior changes

- `saveDocument` now respects the server's save options, so it may send nothing, or send `didSave` with the full text, where it always sent a bare `didSave` before.
- `codeAction` and `inlayHint` `resolveSupport` and workspace symbol `resolveSupport` are now advertised, so some servers may return partial items and defer work to the matching resolve request. Benchmarks of those requests may get faster, with the cost moving to resolve.

### Fixes

- `stop()` never force killed a server that ignored `SIGTERM`, since it checked `process.killed` (which only reports that a signal was sent). It now checks for an actual exit and sends `SIGKILL` after 3 seconds.
- `edit` now applies each edit to the locally tracked document text, in order, following LSP incremental `didChange` semantics. Previously the tracked text never changed after `openDocument`.
- `codeAction` diagnostic code filtering now also matches `data.code`, so quick fixes from servers like Langium that store their issue code in `data` can be triggered.
- `addRegisteredLanguage` stored the extension mapping backwards (language id to extension instead of extension to language id). Extensions are now also lowercased to match `detectLanguageId`.
- `BenchContext.workspaceRoot` is documented as the absolute workspace path it actually holds, not a URI.

### Docs and tests

- README and `lsbench prime` list the full API grouped by area, describe save sync and server to client handling, and correct the stale CLI options and server configuration sections (a JSON server config file was documented but never supported, use `--init-options-file` instead).
- New integration suite against Langium's grammar language server (from devDependencies), covering formatting, code actions, semantic tokens, call and type hierarchy, and more. The minilogo suite now covers the additional methods it supports, and both suites list unsupported methods as skipped.
- `examples/typescript-actions.ts` showcases the new methods.

## v0.1.0

First release!
Expand Down
Loading
Loading