]> git.rmz.io Git - dotfiles.git/commitdiff
nvim/ui: configure noice.nvim
authorSamir Benmendil <me@rmz.io>
Tue, 11 Apr 2023 16:50:51 +0000 (17:50 +0100)
committerSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:36:18 +0000 (17:36 +0000)
* send simple vim messages to mini view
* use classic command line
* add border to lsp docs

nvim/lua/plugins/ui.lua [new file with mode: 0644]

diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua
new file mode 100644 (file)
index 0000000..e91dbb2
--- /dev/null
@@ -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,
+  },
+}