]> git.rmz.io Git - dotfiles.git/commitdiff
lazyvim: absorb snacks.vim init config
authorSamir Benmendil <me@rmz.io>
Sun, 9 Feb 2025 14:02:20 +0000 (14:02 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 2 Mar 2025 15:44:14 +0000 (15:44 +0000)
nvim/lua/plugins/init.lua [new file with mode: 0644]
nvim/lua/plugins/snacks.lua [new file with mode: 0644]

diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua
new file mode 100644 (file)
index 0000000..c21defb
--- /dev/null
@@ -0,0 +1,4 @@
+return {
+  { "folke/lazy.nvim", version = "*" },
+  { "folke/snacks.nvim", priority = 1000, lazy = false },
+}
diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua
new file mode 100644 (file)
index 0000000..ae02a9b
--- /dev/null
@@ -0,0 +1,14 @@
+return {
+  { "folke/snacks.nvim",
+    opts = {},
+    config = function(_, opts)
+      local notify = vim.notify
+      require("snacks").setup(opts)
+      -- HACK: restore vim.notify after snacks setup and let noice.nvim take over
+      -- this is needed to have early notifications show up in noice history
+      if LazyVim.has("noice.nvim") then
+        vim.notify = notify
+      end
+    end,
+  }
+}