Features
- Go to Definition / Go to Declaration — jump to any symbol across files
- Find References — all usages of a symbol across the project
- Rename — project-wide symbol rename with prepare support
- Hover — signatures, NatSpec docs, function/error/event selectors,
@inheritdocresolution - 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 and gas estimates
- File Operations —
workspace/willCreateFilesscaffolding +workspace/willRenameFiles/workspace/willDeleteFilesimport edits +workspace/didCreateFiles/workspace/didRenameFiles/workspace/didDeleteFilescache migration/re-index (fileOperations.templateOnCreate,fileOperations.updateImportsOnRename,fileOperations.updateImportsOnDelete)
LSP Methods
General-
initialize- Server initialization -
initialized- Server initialized notification -
shutdown- Server shutdown
-
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
-
textDocument/publishDiagnostics- Publish compilation errors and warnings viaforge build -
textDocument/publishDiagnostics- Publish linting errors and warnings viaforge lint
-
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/typeDefinition- Go to type definition -
textDocument/implementation- Go to implementation -
textDocument/documentHighlight- Document highlighting (read/write classification) -
textDocument/codeAction- Code actions (quick fixes, refactoring) -
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, gas estimates) -
textDocument/semanticTokens- Semantic tokens -
textDocument/semanticTokens/full- Full semantic tokens -
textDocument/semanticTokens/range- Range semantic tokens -
textDocument/semanticTokens/delta- Delta semantic tokens
-
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 (stub implementation) -
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/showMessage- Show message to user -
window/showMessageRequest- Show message request to user -
window/workDoneProgress- Work done progress