1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/noice.lua
Matei Adriel 01ee066c62 Backup
2022-11-14 01:16:10 +01:00

35 lines
1,003 B
Lua

local H = require("my.helpers")
local M = {}
local function skip_containing(string, opts)
local defaultOptions = { event = "msg_show", kind = "", find = string }
local filter = H.mergeTables(defaultOptions, opts or {})
return { filter = filter, opts = { skip = true } }
end
function M.setup()
-- s - search hit bottom messages
-- c - no pattern found and whatnot
vim.opt.shortmess:append("scC")
-- vim.opt.shortmess = "sc"
require("noice").setup({
cmdline = {
view = "cmdline",
format = {
search_down = { kind = "search", pattern = "^/", icon = "🔎", lang = "regex" },
search_up = { kind = "search", pattern = "^%?", icon = "🔎", lang = "regex" }
}
},
routes = {
-- Filter out "Written ..." messages
skip_containing("written"),
skip_containing("search hit", { event = "wmsg" }),
skip_containing("pattern not found", { event = "msg_show" })
},
lsp = { progres = { enabled = false } }
})
end
return M