From 76c74c5d23f47812cb0e078f156aae1da50c4887 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 9 Nov 2024 19:20:02 -0500 Subject: [PATCH] Auto commit: 2024-11-09 19:20:02 --- .config/nvim/lua/plugins/no-neck-pain.lua | 41 +++++++---------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.config/nvim/lua/plugins/no-neck-pain.lua b/.config/nvim/lua/plugins/no-neck-pain.lua index 03f7630b..e1536569 100644 --- a/.config/nvim/lua/plugins/no-neck-pain.lua +++ b/.config/nvim/lua/plugins/no-neck-pain.lua @@ -1,27 +1,14 @@ local function mapPrefix(prefix, enabled) + require("which-key").add({ + { prefix, group = "+NoNeckPain" }, + }) local M = { - enabled = enabled, - toggle = "np", - -- Sets a global mapping to Neovim, which allows you to toggle the left side buffer. - -- When `false`, the mapping is not created. - --- @type string - toggleLeftSide = "nql", - -- Sets a global mapping to Neovim, which allows you to toggle the right side buffer. - -- When `false`, the mapping is not created. - --- @type string - toggleRightSide = "nqr", - -- Sets a global mapping to Neovim, which allows you to increase the width (+5) of the main window. - -- When `false`, the mapping is not created. - --- @type string | { mapping: string, value: number } - widthUp = "n=", - -- Sets a global mapping to Neovim, which allows you to decrease the width (-5) of the main window. - -- When `false`, the mapping is not created. - --- @type string | { mapping: string, value: number } - widthDown = "n-", - -- Sets a global mapping to Neovim, which allows you to toggle the scratchPad feature. - -- When `false`, the mapping is not created. - --- @type string - scratchPad = "ns", + toggle = "p", + toggleLeftSide = "ql", + toggleRightSide = "qr", + widthUp = "=", + widthDown = "-", + scratchPad = "s", } return M @@ -32,14 +19,12 @@ return { "shortcuts/no-neck-pain.nvim", version = "*", opts = function() - require("which-key").add({ - { "n", group = "+NoNeckPain" }, - }) return { width = 120, - mappings = { - enabled = true, - }, + mappings = mapPrefix("N", true), + -- mappings = { + -- enabled = true, + -- }, autocmds = { enableOnVimEnter = true, skipEnteringNoNeckPainBuffer = true,