Emacs Solidity Server is a fast Solidity language server written in Rust. It’s built for Emacs users who want precise go-to-definition and seamless remapping support without the bloat of a full IDE.
Two things to note:
First one is: it does just enough, and does it right.
The other one is: it goes real well with Doom Emacs.
If you're an auditor or developer working on real-world Solidity codebases, this tool is designed to reduce friction and let you stay keyboard-driven.
Most existing Solidity LSPs either break under real audit setups or bury you in unnecessary features. This one sticks to the essentials.
- Go-to-definition via native
solcAST traversal - Diagnostics directly from
solccompiler - Pragma-aware version resolution with persistent caching
- Import remapping with support for common layouts
- Works out of the box with Foundry, Hardhat and Truffle
- Written in safe Rust with minimal runtime dependencies
Use it alongside
solidity-modefor syntax highlighting and tight Emacs integration.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shgit clone https://github.com/0xh4ty/emacs-solidity-server.git
cd emacs-solidity-server
cargo build --releaseThe binary will be located at:
target/release/emacs-solidity-server-
Pragma-Aware Compilation The server parses the first
pragma soliditydirective in each file and fetches the latest matching patch version. Binaries are cached under~/.cache/emacs-solidity-server/solc/. -
Import Remappings Recognizes remapping formats from:
remappings.txtfoundry.tomlhardhat.config.js/tstruffle-config.js
-
First-Run Compiler Downloads Ensure internet access during first use. The server will download
solcbinaries as needed. -
Syntax and Diagnostics Uses
solcfor diagnostics. Usesolidity-modefor syntax highlighting and disable Flycheck to prevent conflicts.
(with-eval-after-load 'solidity-mode
;; Disable Flycheck. Diagnostics come from solc directly
(advice-add 'solidity-flycheck-setup :override #'ignore))
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(solidity-mode . ("~/path/to/emacs-solidity-server"))) ;; Adjust path
(add-hook 'solidity-mode-hook #'eglot-ensure))- Neovim support
- Hover info and auto-completion
- Enhanced syntax integration
If you spot a bug, hit something broken, or want to request a feature, open an issue. This project is focused and minimal by design, but if something is genuinely useful for audit workflows, it might get in.
Contributions are welcome. Fork the repo, make your changes, and open a pull request. If you're fixing remapping edge cases, compiler version handling, or project compatibility quirks, even better.
This project is licensed under the MIT License.
Developed by 0xh4ty for developers and auditors who prefer keyboard-driven workflows and compiler-accurate navigation.
