feat: add format-buffer key-mapping
This commit is contained in:
parent
bedd106416
commit
1ec0301cb2
@ -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>")
|
||||||
|
Reference in New Issue
Block a user