- Go to Definition / Go to Declaration — jump to any symbol across files, including qualifier segments in qualified type paths (e.g.,
PoolinPool.Statenavigates to the contract/library) - Find References — all usages of a symbol across the project, including qualified type path references (e.g.,
PoolinPool.State); interface/implementation equivalence merges references across interface declarations and their implementing functions - Rename — project-wide symbol rename with prepare support, including qualifier usages in qualified type paths
- Hover — signatures, NatSpec docs, function/error/event selectors,
@inheritdocresolution, AST node ID for debugging - Completions — scope-aware with two modes (fast cache vs full recomputation)
- Document Links — clickable imports, type names, function calls
- Document Symbols / Workspace Symbols — outline and search
- Formatting — via
forge fmt - Diagnostics — from
solcandforge lint - Signature Help — parameter info on function calls, event emits, and mapping access
- Inlay Hints — parameter names at call sites
- File Operations —
workspace/willCreateFilesscaffolding +workspace/willRenameFiles/workspace/willDeleteFilesimport edits +workspace/didCreateFiles/workspace/didRenameFiles/workspace/didDeleteFilescache migration/re-index (fileOperations.templateOnCreate,fileOperations.updateImportsOnRename,fileOperations.updateImportsOnDelete) - Go to Implementation — jump from interface/abstract declarations to their concrete implementations; supports functions, modifiers, and state variables with
baseFunctions/baseModifiers - Call Hierarchy —
textDocument/prepareCallHierarchy,callHierarchy/incomingCalls,callHierarchy/outgoingCalls— navigate call graphs across contracts and libraries; tracks function calls, modifier invocations, and base constructor specifiers with narrow call-site ranges; incoming calls include callers via interface-typed references - Code Actions —
textDocument/codeActionquickfix engine; handlesunused-importforge-lint diagnostic with "Remove unused import" action; JSON-driven rule table indata/error_codes.json - Execute Commands —
solidity.clearCache(wipe on-disk cache + all in-memory caches, full reset) ·solidity.reindex(evict in-memory AST, trigger background reindex from warm disk cache) - Update Check — checks GitHub releases on startup and notifies via
window/showMessagewhen a newer version is available (checkForUpdatessetting, default:true) - Save Performance — content hash check skips redundant solc rebuilds when file is unchanged;
collect_import_pragmasruns on blocking thread pool to avoid stalling the async runtime on large projects
See FEATURES.md for the full LSP feature set and roadmap.
General
-
initialize- Server initialization -
initialized- Server initialized notification -
shutdown- Server shutdown
Text Synchronization
-
textDocument/didOpen- Handle file opening -
textDocument/didChange- Handle file content changes -
textDocument/didSave- Handle file saving with diagnostics refresh -
textDocument/didClose- Handle file closing -
textDocument/willSave- File will save notification -
textDocument/willSaveWaitUntil- File will save wait until
Diagnostics
-
textDocument/publishDiagnostics- Publish compilation errors and warnings viaforge build -
textDocument/publishDiagnostics- Publish linting errors and warnings viaforge lint
Language Features
-
textDocument/definition- Go to definition -
textDocument/declaration- Go to declaration -
textDocument/references- Find all references -
textDocument/documentSymbol- Document symbol outline (contracts, functions, variables, events, structs, enums, etc.) -
textDocument/prepareRename- Prepare rename validation -
textDocument/rename- Rename symbols across files -
textDocument/formatting- Document formatting -
textDocument/completion- Code completion -
textDocument/hover- Hover information -
textDocument/signatureHelp- Function signature help (functions, events, mappings) -
textDocument/prepareCallHierarchy- Prepare call hierarchy (resolve callable at cursor) -
callHierarchy/incomingCalls- Find all callers of a function/modifier/contract -
callHierarchy/outgoingCalls- Find all callees from a function/modifier/contract (includes low-level.call()/.staticcall()/.delegatecall()and Yul call opcodes) -
textDocument/typeDefinition- Go to type definition -
textDocument/implementation- Go to implementation (interface → concrete implementations via baseFunctions) -
textDocument/documentHighlight- Document highlighting (read/write classification) -
textDocument/codeAction- Code actions (unused-import quickfix via forge-lint diagnostics) -
textDocument/codeLens- Code lens -
textDocument/documentLink- Document links (clickable references and import paths) -
textDocument/documentColor- Color information -
textDocument/colorPresentation- Color presentation -
textDocument/rangeFormatting- Range formatting -
textDocument/onTypeFormatting- On-type formatting -
textDocument/foldingRange- Folding ranges (contracts, functions, structs, enums, blocks, comments, imports) -
textDocument/selectionRange- Selection ranges -
textDocument/inlayHint- Inlay hints (parameter names) -
textDocument/semanticTokens- Semantic tokens -
textDocument/semanticTokens/full- Full semantic tokens -
textDocument/semanticTokens/range- Range semantic tokens -
textDocument/semanticTokens/delta- Delta semantic tokens
Workspace Features
-
workspace/symbol- Workspace-wide symbol search -
workspace/didChangeConfiguration- Updates editor settings (inlay hints, lint options) -
workspace/didChangeWatchedFiles- Acknowledges watched file changes (logs only) -
workspace/didChangeWorkspaceFolders- Acknowledges workspace folder changes (logs only) -
workspace/applyEdit- Inbound handler not implemented (server uses outboundworkspace/applyEditto scaffold created files) -
workspace/executeCommand- Execute workspace commands (solidity.clearCache,solidity.reindex) -
workspace/willCreateFiles- File creation preview (scaffolding for.sol,.t.sol,.s.sol) -
workspace/didCreateFiles- Post-create scaffold fallback + cache/index refresh -
workspace/willRenameFiles- File rename preview (import path updates) -
workspace/didRenameFiles- Post-rename cache migration + background re-index -
workspace/willDeleteFiles- File deletion preview (removes imports to deleted files) -
workspace/didDeleteFiles- Post-delete cache cleanup + background re-index
Window Features
-
window/showMessage- Show message to user -
window/showMessageRequest- Show message request to user -
window/workDoneProgress- Work done progress