aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim/.config
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-01-01 17:03:33 -0600
committerToby Vincent <tobyv13@gmail.com>2023-01-01 17:04:27 -0600
commit4a39624193a0e35ccf41dde9bc4fc69ee86d63a0 (patch)
treeba6fcd1e74941a83311f62666708df3f3bc77e75 /nvim/.config
parent732c0796ca5c1ddc82ee557938731f9dd4041f89 (diff)
fix(nvim,noice): route Neogit notifs to mini view
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/noice.lua28
1 files changed, 22 insertions, 6 deletions
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua b/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
index 500de0f..5dee123 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
@@ -57,6 +57,21 @@ local M = {
},
opts = { stop = false },
},
+ {
+ view = "mini",
+ filter = {
+ event = "notify",
+ any = {
+ {
+ error = false,
+ warning = false,
+ cond = function(message)
+ return vim.tbl_get(message, "opts", "title") == "Neogit"
+ end,
+ },
+ },
+ },
+ },
},
views = {
hover = {
@@ -98,16 +113,16 @@ function M.init()
end,
})
- vim.keymap.set("n", "<leader>nl", function()
- require("noice").cmd("last")
- end)
-
vim.keymap.set("n", "<leader>nn", function()
require("noice").cmd("history")
end)
- vim.keymap.set("n", "<leader>nh", function()
- require("noice").cmd("all")
+ vim.keymap.set("n", "<leader>nl", function()
+ require("noice").cmd("last")
+ end)
+
+ vim.keymap.set("n", "<leader>ne", function()
+ require("noice").cmd("errors")
end)
-- TODO: figure out why setting `remap = true` failes to call the `<C-d>zz` mapping
@@ -123,6 +138,7 @@ function M.init()
end
end, { desc = "down half page and center", expr = true })
+ -- NOTE: copied from folke's config, not confident it's necessary
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function(event)