feat: add format-buffer key-mapping

This commit is contained in:
Michael Mandl 2022-03-12 10:40:31 +01:00
parent bedd106416
commit 1ec0301cb2
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7

View file

@ -94,6 +94,9 @@ local function custom_on_attach(client, buffer_nr)
-- Rename all references of symbol
bufnnoremap("<leader>R", "<Cmd>lua vim.lsp.buf.rename()<CR>")
-- Format buffer
bufnnoremap("<leader>F", "<Cmd>lua vim.lsp.buf.formatting_sync()<CR>")
-- Navigate diagnostics
bufnnoremap("<C-n>", "<Cmd>lua vim.diagnostic.goto_next()<CR>")
bufnnoremap("<C-p>", "<Cmd>lua vim.diagnostic.goto_prev()<CR>")