Auto commit: 2024-11-09 19:20:02

This commit is contained in:
Daniel Fichtinger 2024-11-09 19:20:02 -05:00
parent edb5ba1c98
commit 76c74c5d23

View file

@ -1,27 +1,14 @@
local function mapPrefix(prefix, enabled) local function mapPrefix(prefix, enabled)
require("which-key").add({
{ prefix, group = "+NoNeckPain" },
})
local M = { local M = {
enabled = enabled, toggle = "p",
toggle = "<Leader>np", toggleLeftSide = "ql",
-- Sets a global mapping to Neovim, which allows you to toggle the left side buffer. toggleRightSide = "qr",
-- When `false`, the mapping is not created. widthUp = "=",
--- @type string widthDown = "-",
toggleLeftSide = "<Leader>nql", scratchPad = "s",
-- 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 = "<Leader>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 = "<Leader>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 = "<Leader>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 = "<Leader>ns",
} }
return M return M
@ -32,14 +19,12 @@ return {
"shortcuts/no-neck-pain.nvim", "shortcuts/no-neck-pain.nvim",
version = "*", version = "*",
opts = function() opts = function()
require("which-key").add({
{ "<leader>n", group = "+NoNeckPain" },
})
return { return {
width = 120, width = 120,
mappings = { mappings = mapPrefix("<leader>N", true),
enabled = true, -- mappings = {
}, -- enabled = true,
-- },
autocmds = { autocmds = {
enableOnVimEnter = true, enableOnVimEnter = true,
skipEnteringNoNeckPainBuffer = true, skipEnteringNoNeckPainBuffer = true,