From de6db6ac9794d52cab9a719f8fc7a5cb580ab32a Mon Sep 17 00:00:00 2001 From: Warwick Date: Thu, 17 Aug 2023 15:13:28 +0100 Subject: [PATCH] added window management to leader key --- lua/core/plugin_config/whichkey.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/core/plugin_config/whichkey.lua b/lua/core/plugin_config/whichkey.lua index 58b444a..43fd0a6 100644 --- a/lua/core/plugin_config/whichkey.lua +++ b/lua/core/plugin_config/whichkey.lua @@ -32,8 +32,29 @@ local keymap = { g = { 'Telescope git_commits', 'Commits' }, b = { 'Telescope git_branches', 'Branches' }, s = { 'Telescope git_status', 'Status' }, + }, + w = { + name = '+window', + w = 'Pick Window', + s = "Split window", + v = "Split window vertically", + q = "Quit a window", + T = "Break out into a new tab", + x = "Swap current with next", + ["-"] = "Decrease height", + ["+"] = "Increase height", + [""] = "Decrease width", + [">"] = "Increase width", + ["|"] = "Max out the width", + ["="] = "Equally high and wide", + h = "Go to the left window", + l = "Go to the right window", + k = "Go to the up window", + j = "Go to the down window", } } +-- Map window keys to leader w +vim.cmd[[nmap w ]] whichkey.setup { hide_statusline = false,