Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
feat(nvim): center on next/prev diag
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Mar 2, 2023
1 parent 270b412 commit 01da281
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nvim/config/lua/lsp_keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ M.on_attach = function(bufnr)
keymap("<leader>lr", vim.cmd.LspRestart, bufnr)
keymap("[d", function()
vim.diagnostic.goto_prev({ float = false })
vim.cmd("norm zz")
end, bufnr)
keymap("]d", function()
vim.diagnostic.goto_next({ float = false })
vim.cmd("norm zz")
end, bufnr)
end

Expand Down

0 comments on commit 01da281

Please sign in to comment.