diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index 9ebf0bc..fbe66a3 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -40,7 +40,7 @@ vim.opt.completeopt = { "menuone", "popup", "noinsert", "fuzzy" } vim.opt.pumheight = 15 vim.opt.spelloptions = { "camel", "noplainbuffer" } -vim.opt.spelllang = { "en", "programming", "cjk", } +vim.opt.spelllang = { "en", "cjk", } vim.opt.spell = true -- Can't specify this in wordmotion's config due to race conditions @@ -92,6 +92,14 @@ vim.keymap.set("n", "gre", function() vim.diagnostic.setqflist({ severity = vim.diagnostic.severity.ERROR }) end, { desc = "List errors" }) +-- Next error +vim.keymap.set("n", "[e", function() + vim.diagnostic.jump({ count = -1, severity = vim.diagnostic.severity.ERROR }) +end, { desc = "Previous error" }) +vim.keymap.set("n", "]e", function() + vim.diagnostic.jump({ count = 1, severity = vim.diagnostic.severity.ERROR }) +end, { desc = "Next error" }) + -- Center screen after navigating (those are builtin shortcuts) vim.keymap.set("n", "[q", "cprevzvzz", { desc = "Previous quickfix item" }) vim.keymap.set("n", "]q", "cnextzvzz", { desc = "Next quickfix item" })