summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix8
-rw-r--r--lua/config/plugins/extra.lua25
-rw-r--r--lua/config/plugins/mini.lua17
3 files changed, 42 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index 4d9e8da..a09bc90 100644
--- a/flake.nix
+++ b/flake.nix
@@ -160,13 +160,19 @@
lze
lzextras
];
+
libraries = [ plenary-nvim ];
editor = [ vim-repeat ];
+
ui = [
nvim-notify
snacks-nvim
];
- extra = [ nvim-web-devicons ];
+
+ extra = [
+ smart-splits-nvim
+ nvim-web-devicons
+ ];
};
theme =
diff --git a/lua/config/plugins/extra.lua b/lua/config/plugins/extra.lua
index d1e1a4e..4d5b9dc 100644
--- a/lua/config/plugins/extra.lua
+++ b/lua/config/plugins/extra.lua
@@ -1,5 +1,30 @@
return {
{
+ "smart-splits.nvim",
+ after = function(_)
+ local map = vim.keymap.set
+
+ map("n", "<M-h>", require("smart-splits").move_cursor_left)
+ map("n", "<M-j>", require("smart-splits").move_cursor_down)
+ map("n", "<M-k>", require("smart-splits").move_cursor_up)
+ map("n", "<M-l>", require("smart-splits").move_cursor_right)
+ map("n", "<M-Left>", require("smart-splits").move_cursor_left)
+ map("n", "<M-Down>", require("smart-splits").move_cursor_down)
+ map("n", "<M-Up>", require("smart-splits").move_cursor_up)
+ map("n", "<M-Right>", require("smart-splits").move_cursor_right)
+
+ map("n", "<M-S-h>", require("smart-splits").resize_left)
+ map("n", "<M-S-j>", require("smart-splits").resize_down)
+ map("n", "<M-S-k>", require("smart-splits").resize_up)
+ map("n", "<M-S-l>", require("smart-splits").resize_right)
+ map("n", "<M-S-Left>", require("smart-splits").resize_left)
+ map("n", "<M-S-Down>", require("smart-splits").resize_down)
+ map("n", "<M-S-Up>", require("smart-splits").resize_up)
+ map("n", "<M-S-Right>", require("smart-splits").resize_right)
+ end,
+ },
+
+ {
"which-key.nvim",
event = "DeferredUIEnter",
after = function(_)
diff --git a/lua/config/plugins/mini.lua b/lua/config/plugins/mini.lua
index dc9c151..9160744 100644
--- a/lua/config/plugins/mini.lua
+++ b/lua/config/plugins/mini.lua
@@ -49,13 +49,16 @@ return {
})
end,
},
- {
- "mini.move",
- event = "DeferredUIEnter",
- after = function(_)
- require("mini.move").setup()
- end,
- },
+ -- NOTE: keybindings are intersecting with smart-splits.nvim
+ -- In the future I will fix it
+ --
+ -- {
+ -- "mini.move",
+ -- event = "DeferredUIEnter",
+ -- after = function(_)
+ -- require("mini.move").setup()
+ -- end,
+ -- },
{
"mini.pairs",
event = "DeferredUIEnter",