This is a new major version of Prettier Plugin Solidity.
The changes from v1 are minimal, but there are a couple of breaking changes.
The plugin now uses Slang as the parser by default. Slang is a more powerful and correct parser that improves formatting in many edge cases—especially when comments are involved.
If you had the parser explicitly set in your .prettierrc
(e.g., "parser": "solidity-parse"), you'll need to update it to:
"parser": "slang"
If you don't have the parser option set in your config, no action is needed.
The old ANTLR-based parser is still supported in v2, but it's deprecated and will be removed in the next major version.