From b958ac678d219606f8ecee8767a135c022ab8bad Mon Sep 17 00:00:00 2001
From: Tobias Reisinger <tobias@msrg.cc>
Date: Wed, 28 Feb 2024 03:28:03 +0100
Subject: [PATCH] Add sibling-swap plugin

---
 .config/astronvim/lua/user/mappings.lua       | 19 +++++++++++++++++++
 .../lua/user/plugins/nvim-notify.lua          | 10 ++++++++++
 .config/astronvim/lua/user/plugins/user.lua   |  8 ++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 .config/astronvim/lua/user/plugins/nvim-notify.lua

diff --git a/.config/astronvim/lua/user/mappings.lua b/.config/astronvim/lua/user/mappings.lua
index 8ac5c8f..5b797d9 100644
--- a/.config/astronvim/lua/user/mappings.lua
+++ b/.config/astronvim/lua/user/mappings.lua
@@ -32,6 +32,25 @@ return {
     ["<leader>b"] = { name = "Buffers" },
     -- quick save
     -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" },  -- change description but the same command
+
+
+    -- Keep cursor centered
+    ["<C-d>"] = { "<C-d>zz" },
+    ["<C-u>"] = { "<C-u>zz" },
+
+    -- Sibling swap
+    ["g>"] = {
+      function()
+        require("sibling-swap").swap_with_right()
+      end,
+      desc = "Swap with right",
+    },
+    ["g<"] = {
+      function()
+        require("sibling-swap").swap_with_left()
+      end,
+      desc = "Swap with left",
+    },
   },
   t = {
     -- setting a mapping to false will disable it
diff --git a/.config/astronvim/lua/user/plugins/nvim-notify.lua b/.config/astronvim/lua/user/plugins/nvim-notify.lua
new file mode 100644
index 0000000..f1a8865
--- /dev/null
+++ b/.config/astronvim/lua/user/plugins/nvim-notify.lua
@@ -0,0 +1,10 @@
+return {
+  "rcarriga/nvim-notify",
+  config = function(plugin, opts)
+    require("plugins.configs.notify")(plugin, opts)
+    local notify = require "notify"
+    notify.setup({
+      background_colour = "#000000"
+    })
+  end,
+}
diff --git a/.config/astronvim/lua/user/plugins/user.lua b/.config/astronvim/lua/user/plugins/user.lua
index 437ff6e..9bd70b8 100644
--- a/.config/astronvim/lua/user/plugins/user.lua
+++ b/.config/astronvim/lua/user/plugins/user.lua
@@ -21,5 +21,13 @@ return {
     "wakatime/vim-wakatime",
     enabled = wakatime_enabled,
     lazy = false
+  },
+
+  {
+    "Wansmer/sibling-swap.nvim",
+    lazy = false,
+    opts = {
+      use_default_keymaps = false,
+    }
   }
 }