From af76696a92cae8de483a83fbdec6defc3d383f53 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 10 Feb 2025 00:01:25 +0100 Subject: [PATCH] plugins/hlchunk: init --- plugins/by-name/hlchunk/default.nix | 42 +++++++++++ .../plugins/by-name/hlchunk/default.nix | 73 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 plugins/by-name/hlchunk/default.nix create mode 100644 tests/test-sources/plugins/by-name/hlchunk/default.nix diff --git a/plugins/by-name/hlchunk/default.nix b/plugins/by-name/hlchunk/default.nix new file mode 100644 index 00000000..1e762c4b --- /dev/null +++ b/plugins/by-name/hlchunk/default.nix @@ -0,0 +1,42 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "hlchunk"; + packPathName = "hlchunk.nvim"; + package = "hlchunk-nvim"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + settingsExample = { + chunk = { + enable = true; + use_treesitter = true; + style.fg = "#91bef0"; + exclude_filetypes = { + neo-tree = true; + lazyterm = true; + }; + chars = { + horizontal_line = "─"; + vertical_line = "│"; + left_top = "╭"; + left_bottom = "╰"; + right_arrow = "─"; + }; + }; + indent = { + chars = [ "│" ]; + use_treesitter = false; + + style.fg = "#45475a"; + exclude_filetypes = { + neo-tree = true; + lazyterm = true; + }; + }; + blank.enable = false; + line_num = { + use_treesitter = true; + style = "#91bef0"; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/hlchunk/default.nix b/tests/test-sources/plugins/by-name/hlchunk/default.nix new file mode 100644 index 00000000..f427f567 --- /dev/null +++ b/tests/test-sources/plugins/by-name/hlchunk/default.nix @@ -0,0 +1,73 @@ +{ + empty = { + plugins.hlchunk.enable = true; + }; + + defaults = { + plugins.hlchunk = { + enable = true; + + # https://github.com/shellRaining/hlchunk.nvim/tree/main?tab=readme-ov-file#setup + settings = + let + modDefaultConfig = { + enable = false; + style = { }; + notify = false; + priority = 0; + exclude_filetypes = { + aerial = true; + dashboard = true; + # ... + }; + }; + in + { + chunk = modDefaultConfig; + indent = modDefaultConfig; + line_num = modDefaultConfig; + blank = modDefaultConfig; + }; + }; + }; + + example = { + plugins.hlchunk = { + enable = true; + + settings = { + chunk = { + enable = true; + use_treesitter = true; + style.fg = "#91bef0"; + exclude_filetypes = { + neo-tree = true; + lazyterm = true; + }; + chars = { + horizontal_line = "─"; + vertical_line = "│"; + left_top = "╭"; + left_bottom = "╰"; + right_arrow = "─"; + }; + }; + indent = { + chars = [ "│" ]; + use_treesitter = false; + + style.fg = "#45475a"; + exclude_filetypes = { + neo-tree = true; + lazyterm = true; + }; + }; + blank.enable = false; + line_num = { + use_treesitter = true; + style = "#91bef0"; + }; + }; + }; + }; +}