diff --git a/init.lua b/init.lua index db55a9e8fd6..ea40301bb6c 100644 --- a/init.lua +++ b/init.lua @@ -501,6 +501,11 @@ require('lazy').setup({ -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + -- Formats the current buffer + map('f', function() + vim.lsp.buf.format { async = true } + end, '[F]ormat code') + -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed