From 1ec0301cb2bd7aa86c054e451d71cc87b1ab5e98 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sat, 12 Mar 2022 10:40:31 +0100 Subject: [PATCH] feat: add format-buffer key-mapping --- nvim/lua/plugins/lspconfig.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index a65c834..9fb7830 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -94,6 +94,9 @@ local function custom_on_attach(client, buffer_nr) -- Rename all references of symbol bufnnoremap("R", "lua vim.lsp.buf.rename()") + -- Format buffer + bufnnoremap("F", "lua vim.lsp.buf.formatting_sync()") + -- Navigate diagnostics bufnnoremap("", "lua vim.diagnostic.goto_next()") bufnnoremap("", "lua vim.diagnostic.goto_prev()")