diff --git a/README.md b/README.md index 4d43af8..53bc737 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,12 @@ Any options that are not specified when calling `setup` will take on their defau move_down = "j", add_cell_before = "a", add_cell_after = "b", + split = "s", + swap_up = "nil", + swap_down = "nil", + merge_up = "nil", + merge_down = "nil", + }, -- The repl plugin with which to interface -- Current options: "iron" for iron.nvim, "toggleterm" for toggleterm.nvim, diff --git a/lua/notebook-navigator/init.lua b/lua/notebook-navigator/init.lua index 797d291..c9c3dcb 100644 --- a/lua/notebook-navigator/init.lua +++ b/lua/notebook-navigator/init.lua @@ -207,6 +207,34 @@ local function activate_hydra(config) M.split_cell, { desc = "Split cell", nowait = true }, }, + { + config.hydra_keys.swap_up, + function() + M.swap_cell "u" + end, + { desc = "Swap with cell above", nowait = true }, + }, + { + config.hydra_keys.swap_down, + function() + M.swap_cell "d" + end, + { desc = "Swap with cell below", nowait = true }, + }, + { + config.hydra_keys.merge_up, + function() + M.merge_cell "u" + end, + { desc = "Merge with cell above", nowait = true }, + }, + { + config.hydra_keys.merge_down, + function() + M.merge_cell "d" + end, + { desc = "Merge with cell below", nowait = true }, + }, { "q", nil, { exit = true, nowait = true, desc = "exit" } }, { "", nil, { exit = true, nowait = true, desc = "exit" } }, } @@ -263,6 +291,10 @@ M.config = { add_cell_before = "a", add_cell_after = "b", split_cell = "s", + swap_up = "nil", + swap_down = "nil", + merge_up = "nil", + merge_down = "nil", }, -- The repl plugin with which to interface -- Current options: "iron" for iron.nvim, "toggleterm" for toggleterm.nvim,