solidity-language-server 0.1.3

A solidity language server with foundry's build process.
Documentation

Solidity Language Server

Solidity lsp server using foundry's build process only.

Install

Install binary from crates.io

cargo install solidity-language-server

Usage

Start the LSP server using:

solidity-language-server

LSP Features

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
  • textDocument/typeDefinition - Go to type definition
  • textDocument/implementation - Go to implementation
  • textDocument/documentHighlight - Document highlighting
  • textDocument/codeAction - Code actions (quick fixes, refactoring)
  • textDocument/codeLens - Code lens
  • textDocument/documentLink - Document links
  • textDocument/documentColor - Color information
  • textDocument/colorPresentation - Color presentation
  • textDocument/rangeFormatting - Range formatting
  • textDocument/onTypeFormatting - On-type formatting
  • textDocument/foldingRange - Folding ranges
  • textDocument/selectionRange - Selection ranges
  • 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 - Acknowledges configuration changes (logs only)
  • workspace/didChangeWatchedFiles - Acknowledges watched file changes (logs only)
  • workspace/didChangeWorkspaceFolders - Acknowledges workspace folder changes (logs only)
  • workspace/applyEdit - Apply workspace edits
  • workspace/executeCommand - Execute workspace commands (stub implementation)
  • workspace/willCreateFiles - File creation preview
  • workspace/willRenameFiles - File rename preview
  • workspace/willDeleteFiles - File deletion preview

Window Features

  • window/showMessage - Show message to user
  • window/showMessageRequest - Show message request to user
  • window/workDoneProgress - Work done progress