feat: add format-buffer key-mapping

This commit is contained in:
mandlm 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 -- Rename all references of symbol
bufnnoremap("<leader>R", "<Cmd>lua vim.lsp.buf.rename()<CR>") 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 -- Navigate diagnostics
bufnnoremap("<C-n>", "<Cmd>lua vim.diagnostic.goto_next()<CR>") bufnnoremap("<C-n>", "<Cmd>lua vim.diagnostic.goto_next()<CR>")
bufnnoremap("<C-p>", "<Cmd>lua vim.diagnostic.goto_prev()<CR>") bufnnoremap("<C-p>", "<Cmd>lua vim.diagnostic.goto_prev()<CR>")