Skip to content

Commit

Permalink
Merge pull request #1 from nvim-lua/master
Browse files Browse the repository at this point in the history
Add a keymap space-f to format buffer using conform (nvim-lua#817)
  • Loading branch information
Danvs60 committed Mar 31, 2024
2 parents d8a6cf3 + 1175f6d commit 2819689
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,16 @@ require('lazy').setup({

{ -- Autoformat
'stevearc/conform.nvim',
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_fallback = true }
end,
mode = '',
desc = '[F]ormat buffer',
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
Expand Down

0 comments on commit 2819689

Please sign in to comment.