mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Fix diagnostic mapping
This commit is contained in:
@@ -62,8 +62,11 @@ vim.keymap.set({ "n", "x" }, "<leader>P", '"+P', { desc = "Past line from system
|
||||
-- Quickfix list
|
||||
vim.keymap.set("n", "<leader>q", "<cmd>cclose<cr>", { desc = "Close quickfix" })
|
||||
vim.keymap.set("n", "grd", function()
|
||||
vim.diagnostics.setqflist({ severity = { min = vim.diagnostics.severity.WARN } })
|
||||
vim.diagnostic.setqflist({ severity = { min = vim.diagnostic.severity.WARN } })
|
||||
end, { desc = "Open diagnostics" })
|
||||
vim.keymap.set("n", "gre", function()
|
||||
vim.diagnostic.setqflist({ severity = vim.diagnostic.severity.ERROR })
|
||||
end, { desc = "List errors" })
|
||||
|
||||
-- Center screen after navigating (those are builtin shortcuts)
|
||||
vim.keymap.set("n", "[q", "<cmd>cprev<cr>zvzz", { desc = "Previous quickfix item" })
|
||||
@@ -119,8 +122,8 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
desc = "Disable comment continuation (enter or o/O)",
|
||||
group = vim.api.nvim_create_augroup("comment-ro", { clear = true }),
|
||||
callback = function()
|
||||
vim.opt.formatoptions:remove({"r", "o"})
|
||||
vim.opt_local.formatoptions:remove({"r", "o"})
|
||||
vim.opt.formatoptions:remove({ "r", "o" })
|
||||
vim.opt_local.formatoptions:remove({ "r", "o" })
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user