---
title: "💭 Formatting on save · jose-elias-alvarez/null-ls.nvim Wiki"
description: "!https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Formatting-on-save#code"
date: 2023-08-06
published: true
tags:
  - vim
  - nvim
  - thought
template: link
---


<div class="embed-card embed-card-external">
  <a href="https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Formatting-on-save#code" class="embed-card-link" target="_blank" rel="noopener noreferrer">
    <div class="embed-card-image">
      <img src="https://opengraph.githubassets.com/d9a2e94d874581b642e107017eeff8f0a7f5e75f587201d04da732fbff542b46/jose-elias-alvarez/null-ls.nvim" alt="Formatting on save — Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua. - jose-elias-alvarez/null-ls.nvim" loading="lazy">
    </div>
    <div class="embed-card-content">
      <div class="embed-card-title">Formatting on save</div>
      <div class="embed-card-description">Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua. - jose-elias-alvarez/null-ls.nvim</div>
      <div class="embed-card-meta">GitHub &middot; github.com</div>
    </div>
  </a>
</div>


neovim stopped formatting on save for me awhile ago and I have just been dealing with it.  looks like there may have been an api change, idk.


I had to make this update.4

``` diff
- vim.lsp.buf.format()
+ vim.lsp.buf.format({async=false})
``` 

!!! note

    This post is a <a href="/thoughts/" class="wikilink" data-title="Thoughts" data-description="These are generally my thoughts on a web page or some sort of url, except a rare few don&#39;t have a link. These are dual published off of my..." data-date="2024-04-01">thought</a>. It's a short note that I make
    about someone else's content online <a href="/tags/thoughts/" class="hashtag-tag" data-tag="thoughts" data-count=2 data-reading-time=3 data-reading-time-text="3 minutes">#thoughts</a>
