Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

LSP Methods

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 via forge build
  • textDocument/publishDiagnostics - Publish linting errors and warnings via forge 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
  • 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 outbound workspace/applyEdit to 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