From ff8b00535ab893c35d330d58bc3ec019c9cf544f Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 11 Apr 2023 17:50:51 +0100 Subject: [PATCH] nvim/ui: configure noice.nvim * send simple vim messages to mini view * use classic command line * add border to lsp docs --- nvim/lua/plugins/ui.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nvim/lua/plugins/ui.lua diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua new file mode 100644 index 0000000..e91dbb2 --- /dev/null +++ b/nvim/lua/plugins/ui.lua @@ -0,0 +1,31 @@ +return { + { + "noice.nvim", + opts = { + presets = { + command_palette = false, -- don't position the cmdline and popupmenu together + lsp_doc_border = true, -- add a border to hover docs and signature help + }, + cmdline = { + view = "cmdline", + }, + routes = { + { -- send file written messages to mini + filter = { + event = "msg_show", + kind = "", + find = "%[w%]", + }, + opts = { skip = true }, + }, + }, + }, + config = function(_, opts) + -- ensure [w] is written to msg_show so we can match it + vim.opt.shortmess:append("w") + vim.opt.shortmess:remove("W") + + require("noice").setup(opts) + end, + }, +} -- 2.48.1