nvimdotfiles/lua/myworkflow/autocommands.lua
Marco 5381e06eb9 Introduce autocommand for formatting
Now, before a file is saved, we call the vim api format() function
which formats the content of the file.
2023-10-19 09:42:48 +02:00

6 lines
127 B
Lua

vim.api.nvim_create_autocmd('BufWritePre', {
callback = function()
vim.lsp.buf.format { async = false }
end
})