feat(lang): add solidity language support#4742
Merged
folke merged 4 commits intoLazyVim:mainfrom Oct 20, 2025
Merged
Conversation
## Description - Add Solidity language support to `nvim-treesitter` for syntax highlighting and enhanced code understanding. - Configure `nvim-lspconfig` for Solidity LSP support, setting up `solidity_ls` with a root pattern detection for Solidity projects. - Integrate `forge_fmt` as the formatter for Solidity files using `conform.nvim`, with command options for `forge fmt`.
Contributor
|
There's also a neotest adapter for solidity/hardhat |
Contributor
Author
I noticed that these adapters are not maintained frequently and have few users, so I didn't include them. |
Contributor
|
This PR is stale because it has been open 30 days with no activity. |
johnrommeloctaviano
approved these changes
Oct 8, 2025
|
Needed this feature as well |
folke
pushed a commit
that referenced
this pull request
Oct 20, 2025
🤖 I have created a release *beep* *boop* --- ## [15.10.0](v15.9.0...v15.10.0) (2025-10-20) ### Features * **ai:** add avante.nvim for a better AI experience ([#4440](#4440)) ([2682ce0](2682ce0)) * **extra:** allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](#6265)) ([faeb24b](faeb24b)) * **extras:** add Dart language ([#4749](#4749)) ([90f84e7](90f84e7)) * **extras:** added ember lang support ([#6203](#6203)) ([ac4cce0](ac4cce0)) * **extras:** added twig language ([#5464](#5464)) ([a6eb51e](a6eb51e)) * **extras:** ai: add `claudecode.nvim` ([#6229](#6229)) ([e7a3e80](e7a3e80)) * **extras:** automatically update lazyvim.json for renamed or deprecated extras ([37ecd06](37ecd06)) * **extras:** renamed extra omnisharp -> dotnet + added fautocomplete to lspconfig ([1b2e6e8](1b2e6e8)) * **extras:** utils: add `gh.nvim` ([#6250](#6250)) ([8db9c75](8db9c75)) * **go:** add linting with golangci-lint ([#6311](#6311)) ([248876a](248876a)) * **haskell:** update `haskell-tools` version and add formatters + linters ([#6230](#6230)) ([82382f4](82382f4)) * **lang/fsharp:** add F# support to omnisharp extra ([#6538](#6538)) ([80a980a](80a980a)) * **lang:** add neotest config for PHP tests ([#5958](#5958)) ([9b077c7](9b077c7)) * **lang:** add solidity language support ([#4742](#4742)) ([2cd46d4](2cd46d4)) * **lang:** add Typst language support ([#4042](#4042)) ([645846b](645846b)) * **lang:** julia support ([#6231](#6231)) ([5d186c0](5d186c0)) * **lang:** nix add `statix` linter ([#6244](#6244)) ([2a866f6](2a866f6)) * **sidekick:** added sidekick cli status to lualine ([16917db](16917db)) ### Bug Fixes * **extras.lang:** fix Scala extra by using nvimMetals only ([#5726](#5726)) ([f118dca](f118dca)) * **fzf-lua:** added some missing keymaps similar to snacks picker. Closes [#6036](#6036). Closes [#5830](#5830) ([69a5744](69a5744)) * **helm:** broken helm highlighting ([#5335](#5335)) ([4d0d87f](4d0d87f)) * **keymap:** remove select mode remaps of printable characters ([#6296](#6296)) ([83468be](83468be)) * **tailwind:** additional settings ([#5266](#5266)) ([d2f9885](d2f9885)) * **telescope:** sync keymaps with snacks picker + added some that were missing ([1a08e9f](1a08e9f)) * **twig:** correct mason url ([9d345de](9d345de)) * **typescript:** better default pwa-node DAP config. Closes [#6386](#6386) ([e4d3432](e4d3432)) * **typescript:** support chrome, node and msedge dap adapters ([#6649](#6649)) ([0b65d33](0b65d33)) * **util.project:** different mapping on dashboard than `snacks.projects` ([#5737](#5737)) ([e389447](e389447)) ### Reverts * "feat(extra): allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](#6265))" ([#6650](#6650)) ([a582f00](a582f00)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
NanoBoom
pushed a commit
to NanoBoom/LazyVim
that referenced
this pull request
Oct 21, 2025
🤖 I have created a release *beep* *boop* --- ## [15.10.0](LazyVim/LazyVim@v15.9.0...v15.10.0) (2025-10-20) ### Features * **ai:** add avante.nvim for a better AI experience ([#4440](LazyVim/LazyVim#4440)) ([2682ce0](LazyVim/LazyVim@2682ce0)) * **extra:** allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](LazyVim/LazyVim#6265)) ([faeb24b](LazyVim/LazyVim@faeb24b)) * **extras:** add Dart language ([#4749](LazyVim/LazyVim#4749)) ([90f84e7](LazyVim/LazyVim@90f84e7)) * **extras:** added ember lang support ([#6203](LazyVim/LazyVim#6203)) ([ac4cce0](LazyVim/LazyVim@ac4cce0)) * **extras:** added twig language ([#5464](LazyVim/LazyVim#5464)) ([a6eb51e](LazyVim/LazyVim@a6eb51e)) * **extras:** ai: add `claudecode.nvim` ([#6229](LazyVim/LazyVim#6229)) ([e7a3e80](LazyVim/LazyVim@e7a3e80)) * **extras:** automatically update lazyvim.json for renamed or deprecated extras ([37ecd06](LazyVim/LazyVim@37ecd06)) * **extras:** renamed extra omnisharp -> dotnet + added fautocomplete to lspconfig ([1b2e6e8](LazyVim/LazyVim@1b2e6e8)) * **extras:** utils: add `gh.nvim` ([#6250](LazyVim/LazyVim#6250)) ([8db9c75](LazyVim/LazyVim@8db9c75)) * **go:** add linting with golangci-lint ([#6311](LazyVim/LazyVim#6311)) ([248876a](LazyVim/LazyVim@248876a)) * **haskell:** update `haskell-tools` version and add formatters + linters ([#6230](LazyVim/LazyVim#6230)) ([82382f4](LazyVim/LazyVim@82382f4)) * **lang/fsharp:** add F# support to omnisharp extra ([#6538](LazyVim/LazyVim#6538)) ([80a980a](LazyVim/LazyVim@80a980a)) * **lang:** add neotest config for PHP tests ([#5958](LazyVim/LazyVim#5958)) ([9b077c7](LazyVim/LazyVim@9b077c7)) * **lang:** add solidity language support ([#4742](LazyVim/LazyVim#4742)) ([2cd46d4](LazyVim/LazyVim@2cd46d4)) * **lang:** add Typst language support ([#4042](LazyVim/LazyVim#4042)) ([645846b](LazyVim/LazyVim@645846b)) * **lang:** julia support ([#6231](LazyVim/LazyVim#6231)) ([5d186c0](LazyVim/LazyVim@5d186c0)) * **lang:** nix add `statix` linter ([#6244](LazyVim/LazyVim#6244)) ([2a866f6](LazyVim/LazyVim@2a866f6)) * **sidekick:** added sidekick cli status to lualine ([16917db](LazyVim/LazyVim@16917db)) ### Bug Fixes * **extras.lang:** fix Scala extra by using nvimMetals only ([#5726](LazyVim/LazyVim#5726)) ([f118dca](LazyVim/LazyVim@f118dca)) * **fzf-lua:** added some missing keymaps similar to snacks picker. Closes [#6036](LazyVim/LazyVim#6036). Closes [#5830](LazyVim/LazyVim#5830) ([69a5744](LazyVim/LazyVim@69a5744)) * **helm:** broken helm highlighting ([#5335](LazyVim/LazyVim#5335)) ([4d0d87f](LazyVim/LazyVim@4d0d87f)) * **keymap:** remove select mode remaps of printable characters ([#6296](LazyVim/LazyVim#6296)) ([83468be](LazyVim/LazyVim@83468be)) * **tailwind:** additional settings ([#5266](LazyVim/LazyVim#5266)) ([d2f9885](LazyVim/LazyVim@d2f9885)) * **telescope:** sync keymaps with snacks picker + added some that were missing ([1a08e9f](LazyVim/LazyVim@1a08e9f)) * **twig:** correct mason url ([9d345de](LazyVim/LazyVim@9d345de)) * **typescript:** better default pwa-node DAP config. Closes [#6386](LazyVim/LazyVim#6386) ([e4d3432](LazyVim/LazyVim@e4d3432)) * **typescript:** support chrome, node and msedge dap adapters ([#6649](LazyVim/LazyVim#6649)) ([0b65d33](LazyVim/LazyVim@0b65d33)) * **util.project:** different mapping on dashboard than `snacks.projects` ([#5737](LazyVim/LazyVim#5737)) ([e389447](LazyVim/LazyVim@e389447)) ### Reverts * "feat(extra): allow users to add custom bundles through opts.init_options.bundles to jdtls ([#6265](LazyVim/LazyVim#6265))" ([#6650](LazyVim/LazyVim#6650)) ([a582f00](LazyVim/LazyVim@a582f00)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
This PR adds comprehensive support for Solidity development in Neovim using LazyVim. The following updates were made to streamline Solidity development:
Changes
foundry.toml,hardhat.config.js, andhardhat.config.tsfiles.solidityto the list of languages ensured bynvim-treesitter, providing syntax highlighting and better code structure understanding.nvim-lspconfigto supportsolidity_lsas the LSP for Solidity files.root_dirdetection based on project files or a.gitdirectory to enable proper LSP functioning in Solidity projects.forge_fmtas a formatter for Solidity files usingconform.nvim, which utilizesforge fmtto format code.Why use
forge fmtinstead of Prettier?prettier-plugin-solidity. Even withvim.g.lazyvim_prettier_needs_config = false, formatting won't work unless a.prettierrcfile is configured, creating unnecessary complexity.forge fmtis the native tool for Solidity development:Forgeis a widely used tool within the Solidity ecosystem, especially when working with Foundry. It provides built-in formatting with no extra dependencies, making it simpler and more efficient to integrate.prettier-plugin-solidity: For users of Hardhat,prettier-plugin-solidityis required for code formatting. However, the integration with Prettier might add complexity, whileforge fmtsimplifies the process.prettier-plugin-solidityandforge fmtfor formatting in the future, depending on their preferred tools.Testing
forge_fmtfor automatic code formatting on Solidity files.Motivation
These changes provide a smoother and more robust Solidity development experience in Lazyvim, including syntax highlighting, code navigation, and automatic formatting.
Related Issue(s)
#1901
Checklist