feat: add format-buffer key-mapping
This commit is contained in:
parent
bedd106416
commit
1ec0301cb2
1 changed files with 3 additions and 0 deletions
|
@ -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>")
|
||||||
|
|
Loading…
Reference in a new issue