Modern Format on Save in Neovim (opens in new tab)
From Mitchell Hanberg's Blog: Formatting on save is a popular workflow and is builtin to many text editors and IDEs. In Neovim, you must create this manually, but it is very easy using `autocmds`. 1. We create a new `autocmd` that fires on the `LspAttach` event. This event is fired when an LSP client attaches to a buffer. In this `autocmd`, you can easily set configuration that is specific to that buffer and LSP client. 2. We create another `autcmd` inside the `LspAttach` callback, this time ...
Read the original article