solidity-language-server 0.1.23

A fast Solidity language server powered by solc and Foundry
Documentation

Solidity Language Server

Crates.io Tests Release GitHub Release Telegram

The fastest Solidity language server — go-to-definition, references, rename, completions, hover, and more. See benchmarks.

Install

cargo install solidity-language-server

Or download a pre-built binary from the latest release.

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, @inheritdoc resolution
  • 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 solc and forge lint

See FEATURES.md for the full LSP feature set and roadmap.

Docs

Neovim

return {
  name = "Solidity Language Server",
  cmd = { "solidity-language-server" },
  root_dir = vim.fs.root(0, { "foundry.toml", ".git" }),
  filetypes = { "solidity" },
  root_markers = { "foundry.toml", ".git" },
  on_attach = function(_, _)
    vim.api.nvim_create_autocmd("BufWritePost", {
      pattern = { "*.sol" },
      callback = function()
        vim.lsp.buf.format()
      end,
    })
  end,
}

Verify Release Binaries

Release binaries are GPG-signed. Download checksums-sha256.txt, checksums-sha256.txt.asc, and public-key.asc from the release:

gpg --import public-key.asc
gpg --verify checksums-sha256.txt.asc checksums-sha256.txt
sha256sum -c checksums-sha256.txt