diff options
author | Squibid <me@zacharyscheiman.com> | 2023-04-30 18:41:13 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-04-30 18:41:13 -0400 |
commit | 01a09f243ce07d367c539d69d4a7f4541ab1dcd7 (patch) | |
tree | ec2af23e59a38d4f9ac476e69abc07c8110b52a1 /after/plugin/smartsplits.lua | |
parent | 7c5d3eff786bef884022cc813448bb085ba4eccd (diff) | |
download | nvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.tar.gz nvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.tar.bz2 nvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.zip |
new config old version is now on v1 branch
Diffstat (limited to '')
-rw-r--r-- | after/plugin/smartsplits.lua | 28 |
1 files changed, 28 insertions, 0 deletions
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 = '<leader>r', + resize_keys = { + '<C-h>', + '<C-j>', + '<C-k>', + '<C-l>', + }, + silent = true, + hooks = { + on_enter = function() + vim.notify("Resize mode on", vim.log.levels.INFO, { title = "Smart Splits" }) + vim.cmd('unmap <leader>r') + end, + on_leave = function() + vim.notify("Resize Mode off", vim.log.levels.INFO, { title = "Smart Splits" }) + vim.keymap.set('n', '<leader>r', smartsplits.start_resize_mode, {}) + end, + }, + }, +} |