refactor(nvim): improve how noice setup is handled

This commit is contained in:
Price Hiller 2024-06-11 22:17:26 -05:00
parent 1971907a75
commit 59f7c95103
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -2,61 +2,62 @@ return {
{
"folke/noice.nvim",
lazy = false,
init = function()
config = function()
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
long_message_to_split = true,
command_palette = true,
},
views = {
cmdline_popup = {
border = {
style = "none",
},
position = {
row = "99%",
col = "0%",
},
},
},
popupmenu = {
backend = "cmp",
},
routes = {
{
filter = { event = "msg_show", find = "Hop .*:" },
opts = { skip = true },
},
-- Ignore `written` message
{
filter = { event = "msg_show", find = '^".*" %d*L, %d*B written$' },
opts = { skip = true },
},
-- Ignore `undo` message
{
filter = { event = "msg_show", find = "^%d+ .*; before #%d+ %d+.*ago$" },
opts = { skip = true },
},
-- Ignore `redo` message
{
filter = { event = "msg_show", find = "^%d+ .*; after #%d+ %d+.*ago$" },
opts = { skip = true },
},
{
view = "split",
filter = { event = "msg_show", min_height = 20 },
},
},
})
vim.opt.cmdheight = 0
end,
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
long_message_to_split = true,
command_palette = true,
},
views = {
cmdline_popup = {
border = {
style = "none",
},
position = {
row = "99%",
col = "0%",
},
},
},
popupmenu = {
backend = "cmp",
},
routes = {
{
filter = { event = "msg_show", find = "Hop .*:" },
opts = { skip = true },
},
-- Ignore `written` message
{
filter = { event = "msg_show", find = '^".*" %d*L, %d*B written$' },
opts = { skip = true },
},
-- Ignore `undo` message
{
filter = { event = "msg_show", find = "^%d+ .*; before #%d+ %d+.*ago$" },
opts = { skip = true },
},
-- Ignore `redo` message
{
filter = { event = "msg_show", find = "^%d+ .*; after #%d+ %d+.*ago$" },
opts = { skip = true },
},
{
view = "split",
filter = { event = "msg_show", min_height = 20 },
},
},
},
dependencies = {
"MunifTanjim/nui.nvim",
{