diff --git a/plugins/smart-splits.nix b/plugins/smart-splits.nix new file mode 100644 index 0000000..5396cd8 --- /dev/null +++ b/plugins/smart-splits.nix @@ -0,0 +1,63 @@ +_: + +{ + opts = { + enable = true; + + settings = { + ignored_filetypes = [ "nofile" "quickfix" "qf" "prompt" ]; + ignored_buftypes = [ "nofile" ]; + }; + }; + + rootOpts.keymaps = [ + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').move_cursor_left() end"; + options.desc = "Move to left split"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').move_cursor_down() end"; + options.desc = "Move to below split"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').move_cursor_up() end"; + options.desc = "Move to above split"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').move_cursor_right() end"; + options.desc = "Move to right split"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').resize_up() end"; + options.desc = "Resize split up"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').resize_down() end"; + options.desc = "Resize split down"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').resize_left() end"; + options.desc = "Resize split left"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require('smart-splits').resize_right() end"; + options.desc = "Resize split right"; + } + ]; +}