From 01a09f243ce07d367c539d69d4a7f4541ab1dcd7 Mon Sep 17 00:00:00 2001 From: Squibid Date: Sun, 30 Apr 2023 18:41:13 -0400 Subject: new config old version is now on v1 branch --- after/plugin/smartsplits.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 after/plugin/smartsplits.lua (limited to 'after/plugin/smartsplits.lua') diff --git a/after/plugin/smartsplits.lua b/after/plugin/smartsplits.lua new file mode 100644 index 0000000..54fc07c --- /dev/null +++ b/after/plugin/smartsplits.lua @@ -0,0 +1,28 @@ +local status_ok, smartsplits = pcall(require, "smart-splits") +if not status_ok then + return +end + +smartsplits.setup { + default_amount = 3, + resize_mode = { + quit_key = 'r', + resize_keys = { + '', + '', + '', + '', + }, + silent = true, + hooks = { + on_enter = function() + vim.notify("Resize mode on", vim.log.levels.INFO, { title = "Smart Splits" }) + vim.cmd('unmap r') + end, + on_leave = function() + vim.notify("Resize Mode off", vim.log.levels.INFO, { title = "Smart Splits" }) + vim.keymap.set('n', 'r', smartsplits.start_resize_mode, {}) + end, + }, + }, +} -- cgit v1.2.1