From bdc33452c3eac03bed43a6a715d8553f151f7f4b Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:00:54 -0500 Subject: [PATCH] (nvim) bind go to diagnostic on lsp attach --- nvim/lua/juancwu/plugins/lsp.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvim/lua/juancwu/plugins/lsp.lua b/nvim/lua/juancwu/plugins/lsp.lua index bc7db36..5951443 100644 --- a/nvim/lua/juancwu/plugins/lsp.lua +++ b/nvim/lua/juancwu/plugins/lsp.lua @@ -59,6 +59,9 @@ return { -- For example, in C this would take you to the header. map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") + map("[d", vim.diagnostic.goto_prev, "Go to previous diagnostic") + map("]d", vim.diagnostic.goto_next, "Go to next diagnostic") + -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed