From 60556b5df9b70b7be88de760e695892b9ce74b9e Mon Sep 17 00:00:00 2001 From: Chelsea Wilkinson Date: Sat, 19 Jul 2025 13:14:33 +1000 Subject: [PATCH] plugins/no-neck-pain: init --- plugins/by-name/no-neck-pain/default.nix | 30 ++++++++ .../plugins/by-name/no-neck-pain/default.nix | 76 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 plugins/by-name/no-neck-pain/default.nix create mode 100644 tests/test-sources/plugins/by-name/no-neck-pain/default.nix diff --git a/plugins/by-name/no-neck-pain/default.nix b/plugins/by-name/no-neck-pain/default.nix new file mode 100644 index 00000000..ac537d46 --- /dev/null +++ b/plugins/by-name/no-neck-pain/default.nix @@ -0,0 +1,30 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "no-neck-pain"; + maintainers = [ lib.maintainers.ChelseaWilkinson ]; + packPathName = "no-neck-pain.nvim"; + package = "no-neck-pain-nvim"; + description = "☕ Dead simple yet super extensible zen mode plugin to protect your neck."; + + settingsExample = { + width = 80; + autocmds = { + enableOnVimEnter = true; + skipEnteringNoNeckPainBuffer = true; + }; + buffers = { + colors = { + background = "catppuccin-frappe"; + blend = -0.1; + }; + scratchPad = { + enabled = true; + fileName = "notes"; + location = "~/"; + }; + bo = { + filetype = "md"; + }; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/no-neck-pain/default.nix b/tests/test-sources/plugins/by-name/no-neck-pain/default.nix new file mode 100644 index 00000000..66a973f8 --- /dev/null +++ b/tests/test-sources/plugins/by-name/no-neck-pain/default.nix @@ -0,0 +1,76 @@ +{ + empty = { + plugins.no-neck-pain.enable = true; + }; + + defaults = { + plugins.no-neck-pain = { + enable = true; + + settings = { + debug = false; + width = 100; + minSideBufferWidth = 10; + disableOnLastBuffer = false; + killAllBuffersOnDisable = false; + fallbackOnBufferDelete = true; + + autocmds = { + enableOnVimEnter = false; + enableOnTabEnter = false; + }; + + mappings = { + enabled = false; + toggle = "np"; + }; + + buffers = { + setNames = false; + colors = { + background = null; + blend = 0; + }; + left = { + enabled = true; + }; + right = { + enabled = true; + }; + }; + + integrations = { + NvimTree = { + position = "left"; + reopen = true; + }; + }; + }; + }; + }; + + example = { + plugins.no-neck-pain.enable = true; + plugins.no-neck-pain.settings = { + width = 80; + autocmds = { + enableOnVimEnter = true; + skipEnteringNoNeckPainBuffer = true; + }; + buffers = { + colors = { + background = "catppuccin-frappe"; + blend = -0.1; + }; + scratchPad = { + enabled = true; + fileName = "notes"; + location = "~/"; + }; + bo = { + filetype = "md"; + }; + }; + }; + }; +}