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).
This commit is contained in:
Marty Oehme 2023-09-23 07:43:49 +02:00
parent dc9f9373fe
commit e016b0a056
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -48,13 +48,13 @@ local function on_attach(client, bufnr)
map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", { buffer = bufnr, desc = "Next diagnostic" }) map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", { buffer = bufnr, desc = "Next diagnostic" })
map( map(
"n", "n",
"[e", "[D",
"<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>", "<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>",
{ buffer = bufnr, desc = "Previous error" } { buffer = bufnr, desc = "Previous error" }
) )
map( map(
"n", "n",
"]e", "]D",
"<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>", "<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>",
{ buffer = bufnr, desc = "Next error" } { buffer = bufnr, desc = "Next error" }
) )