From e016b0a056532b18d99b1591a2a2c24835b783ff Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Sep 2023 07:43:49 +0200 Subject: [PATCH] nvim: Remap lsp go to next/previous error Mapped to `[D` / `]D`, reflecting the capitalization of going to the next general diagnostic (`[d`/`]d`). Now it is similar to spelling mistakes and spelling errors (`]s[s`/`]S[S` respectively). --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index b2d611d..25ae1cb 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -48,13 +48,13 @@ local function on_attach(client, bufnr) map("n", "]d", "lua vim.diagnostic.goto_next()", { buffer = bufnr, desc = "Next diagnostic" }) map( "n", - "[e", + "[D", "lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})", { buffer = bufnr, desc = "Previous error" } ) map( "n", - "]e", + "]D", "lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})", { buffer = bufnr, desc = "Next error" } )