Skip to content

docs: Neovim - Add section on enabling fix-on-save with Conform.nvim and remove typo#215

Open
bjyberg wants to merge 2 commits into
etiennebacher:mainfrom
bjyberg:docs/neovim-autoformat
Open

docs: Neovim - Add section on enabling fix-on-save with Conform.nvim and remove typo#215
bjyberg wants to merge 2 commits into
etiennebacher:mainfrom
bjyberg:docs/neovim-autoformat

Conversation

@bjyberg

@bjyberg bjyberg commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

I was able to get fix on save working in Neovim and thought it may be helpful to add in the editor documentation for people. It does require an additional Neovim plugin, but it is probably the most popular plugin for formatting in Neovim. I'll let you decide if it is worth adding! Somewhat of a cheat method of addressing #160 but it works well for me!

I also removed the note in parentheses about seeing the below note that no longer exists.

@etiennebacher

etiennebacher commented Nov 28, 2025

Copy link
Copy Markdown
Owner

Hi @bjyberg, thanks for this but I'd like to have a better idea of what the "Fix on save" behavior would be before starting documenting it. Currently, there are two points that bother me a bit:

  • how would the "Fix on save" behavior of Jarl interact with other "<action> on save" provided by other tools, for instance "Format on save" from Air. Does the order of actions depend on the order of the tools in the config? Jarl is not a formatter so some fixes may lead to code that would be modified by a proper formatter like Air, so ideally Air must always run last.
  • how would this interact with the absence of a VCS or with a dirty environment? I see that you mention --allow-no-vcs and we could also add --allow-dirty but this seems to be a global option that would be active for all projects, which is not desirable IMO.

I want to have this feature at some point, but maybe the way to go will be to implement the LSP feature "Fix all" and then have all other tools call this when saving the files (like this: https://jackevans.bearblog.dev/neovim-autofix-ruff-errors-on-save/). This is not my priority at the moment, but let's keep this open so it is somewhat visible to people who would be interested in this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants