A Neovim plugin that automatically formats files on save using LSP or shell utilities like prettierd and shfmt.
format-on-save.nvim is a Neovim plugin that automatically formats code when files are saved, using either Language Server Protocol (LSP) formatters or shell utilities like prettierd and shfmt. It solves the problem of maintaining consistent code style without manual intervention, especially after the deprecation of tools like null-ls.
Neovim users who want automated, reliable code formatting integrated into their editor workflow, particularly those transitioning from null-ls or seeking a simple format-on-save solution.
Developers choose this plugin for its straightforward synchronous approach, support for both LSP and shell formatters, and features like cursor restoration, avoiding the complexity and edge cases found in other formatting plugins.
Automatically formats files when saving using either LSP or shell utilities like prettierd or shfmt
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Ensures formatting completes before the file is saved, avoiding complex edge cases associated with asynchronous operations, as stated in the README's core principles.
Supports LSP formatters, shell utilities like prettierd, custom Lua functions, and lazy-loaded formatters, allowing flexible configuration for different filetypes and projects.
Automatically restores cursor positions across all windows displaying the current file, which is useful for split editing and enhances the user experience.
Allows customization of error notifications via built-in notifiers or custom implementations, such as using vim.notify for tailored error reporting.
The plugin is no longer maintained, as the author has switched to conform.nvim, leaving known bugs unfixed and no future updates, as highlighted in the README warning.
Forces all formatting to be synchronous, which can block the editor and cause delays with slower formatters, limiting flexibility for performance-sensitive workflows.
Missing planned features from the TODO list, such as file size limits, LSP timeout configuration, and better error handling for non-zero exit codes, reducing robustness.