feat: add format-buffer key-mapping

main
mandlm 2022-03-12 10:40:31 +01:00
parent bedd106416
commit 1ec0301cb2
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 3 additions and 0 deletions

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>")