From 30d8be8628330bc5baa064e0dac904a574558b17 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 2 Jul 2025 11:48:40 +0200 Subject: [PATCH] plugins/linediff: init Add support for [linediff.vim](https://github.com/AndrewRadev/linediff.vim), a vim plugin to perform diffs on blocks of code. Closes #3520 --- plugins/by-name/linediff/default.nix | 16 +++++++++ .../plugins/by-name/linediff/default.nix | 33 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 plugins/by-name/linediff/default.nix create mode 100644 tests/test-sources/plugins/by-name/linediff/default.nix diff --git a/plugins/by-name/linediff/default.nix b/plugins/by-name/linediff/default.nix new file mode 100644 index 00000000..54f95bc4 --- /dev/null +++ b/plugins/by-name/linediff/default.nix @@ -0,0 +1,16 @@ +{ lib, ... }: +lib.nixvim.plugins.mkVimPlugin { + name = "linediff"; + packPathName = "linediff.vim"; + package = "linediff-vim"; + + globalPrefix = "linediff_"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + settingsExample = { + modify_statusline = 0; + first_buffer_command = "topleft new"; + second_buffer_command = "vertical new"; + }; +} diff --git a/tests/test-sources/plugins/by-name/linediff/default.nix b/tests/test-sources/plugins/by-name/linediff/default.nix new file mode 100644 index 00000000..d0576bc5 --- /dev/null +++ b/tests/test-sources/plugins/by-name/linediff/default.nix @@ -0,0 +1,33 @@ +{ + empty = { + plugins.linediff.enable = true; + }; + + defaults = { + plugins.linediff = { + enable = true; + + settings = { + indent = 0; + buffer_type = "tempfile"; + first_buffer_command = "tabnew"; + further_buffer_command = "rightbelow vertical new"; + diffopt = "builtin"; + modify_statusline = 0; + sign_highlight_group = "Search"; + }; + }; + }; + + example = { + plugins.linediff = { + enable = true; + + settings = { + modify_statusline = 0; + first_buffer_command = "topleft new"; + second_buffer_command = "vertical new"; + }; + }; + }; +}