Instructions for asyncswap/solidity-language-server, covering agents, prerequisites: ast identity model, the two id types, the src string format and why file ids are unstable from solc.
Test, validate, and benchmark performance of LSP servers using only YAML. Configs for benchmarks, response assertions, multi-file consistency checks, file-edit sequences, lifecycle tests, version comparisons, and LSP session management — restart per benchmark (cold) or reuse one initialized session across steps (warm).
Verify the LSP response shape with expect:. Use when you want the bench to fail if the response shrinks, the wrong file resolves, or a specific completion item disappears.
Manage how the LSP is run during a benchmark — restart it for every iteration (cold) or reuse one initialized session across iterations (warm). Use cold to measure what the user feels on first use; use warm to measure steady-state response cost.
Invoke a server-defined command via workspace/executeCommand. Set waitForProgress: true if the command kicks off background work you want to include in the timing.
Send custom configuration to the LSP during initialize via initializeSettings:. Mirrors the editor's settings block — used to enable inlay hints, lint, file-operations, custom indexing modes, etc.
Run the same LSP method across a sequence of file edits via didChange: snapshots. Use when you want to see how a method's response changes as the file evolves — added callers, shifted positions, new modifier usages, etc.
Open additional files mid-session via didOpen: and re-run the request on the original file. Use to test cross-file discovery — does the response grow as the LSP learns about more files?
Test full file-rename / create / delete lifecycles via renameFiles:, createFiles:, and deleteFiles:. Each step exercises the LSP's request → apply edits → on-disk operation → notification → re-index cycle and restores the project at the end.
Per-method config schema for every LSP method lsp-bench supports. Lists every key valid under each methods. : block — required, optional, type, default. Use to validate what a method's config can or cannot do.
Run the same LSP method against multiple (file, line, col) triples in one bench session via batch:. Use to perf-sweep across files, or to check references from different files / locations all return the same set.
Re-issue a captured LSP request from a previous benchmark run against any server. Use to debug a single failing request without re-running the full bench, or to bisect a regression by replaying the same request against earlier server versions.
Project layout, servers.yaml registry, and top-level config keys for lsp-bench. Use before writing per-method configs to set up shared bits (registry, common initializeSettings, include: composition); reference when the user asks "where do I configure servers" or "how do I bench against multiple versions".
Make the bench wait for a specific LSP $/progress token before sending the request, or wait for a progress token to end after the response. Use when the request depends on background work (project indexing, sub-cache loading, custom build steps).
Analyze incoming and outgoing calls for Solidity functions using LSP call hierarchy with recursive depth tracing and manual grep for low-level calls. Use when analyzing call graphs, tracing call chains, auditing external calls, or checking reentrancy surfaces in Solidity contracts.
Enumerate state-changing entrypoints in Solidity contracts, trace user-supplied parameters into state mutations and external calls, and flag unsanitized inputs. Use when auditing attack surface, reviewing access control, checking input validation, or scoping a security review.
Generate Foundry proof-of-concept tests that validate HIGH and CRITICAL security findings. Produces runnable Solidity test files with attack contracts, setup scaffolding, and pass/fail assertions. Use after running entrypoint-analysis or call-analysis when findings need validation.
Analyze incoming and outgoing calls for Solidity functions using LSP call hierarchy with recursive depth tracing and manual grep for low-level calls. Use when analyzing call graphs, tracing call chains, auditing external calls, or checking reentrancy surfaces in Solidity contracts.
Fix Solidity code quality issues using LSP diagnostics and structural analysis. Reacts to live diagnostics (naming, gas, safety, unused imports) published by the Solidity Language Server, and uses LSP findReferences for safe cross-file renames. Detects dead code via LSP reference counting. Use when asked to clean up…
Enumerate state-changing entrypoints in Solidity contracts, trace user-supplied parameters into state mutations and external calls, and flag unsanitized inputs. Use when auditing attack surface, reviewing access control, checking input validation, or scoping a security review.
Generate Foundry proof-of-concept tests that validate HIGH and CRITICAL security findings from entrypoint analysis. Produces runnable Solidity test files with attack contracts, setup scaffolding, and pass/fail assertions. Use after running entrypoint-analysis or call-analysis when findings need validation.
Orchestrated LSP-augmented security review of Solidity contracts. Spawns call-analysis, entrypoint-analysis, and poc-generator agents in parallel, deduplicates findings, validates through judging gates, and produces a formatted audit report. Use when asked to audit, review security, or do a full security analysis of…