From 50ed5ddd1072a6b10e6368cc338d759ffa02df9b Mon Sep 17 00:00:00 2001 From: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Date: Sat, 5 Jul 2025 22:32:43 -0400 Subject: [PATCH] {neovim, vim}: add testbeds (#1571) Link: https://github.com/nix-community/stylix/pull/1571 Reviewed-by: "Shahar \"Dawn\" Or" Reviewed-by: awwpotato --- modules/neovim/testbeds/neovim.nix | 17 +++++++++++++++++ modules/neovim/testbeds/vim.nix | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 modules/neovim/testbeds/neovim.nix create mode 100644 modules/neovim/testbeds/vim.nix diff --git a/modules/neovim/testbeds/neovim.nix b/modules/neovim/testbeds/neovim.nix new file mode 100644 index 00000000..cd741d5f --- /dev/null +++ b/modules/neovim/testbeds/neovim.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: +{ + stylix.testbed.ui.command = { + text = "nvim example.md"; + useTerminal = true; + }; + + home-manager.sharedModules = lib.singleton { + programs.neovim.enable = true; + home.file."example.md" = { + source = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Markdown/example.md"; + hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA="; + }; + }; + }; +} diff --git a/modules/neovim/testbeds/vim.nix b/modules/neovim/testbeds/vim.nix new file mode 100644 index 00000000..745b218b --- /dev/null +++ b/modules/neovim/testbeds/vim.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: +{ + stylix.testbed.ui.command = { + text = "${lib.getExe pkgs.vim} example.md"; + useTerminal = true; + }; + + home-manager.sharedModules = lib.singleton { + programs.vim.enable = true; + home.file."example.md" = { + source = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/sharkdp/bat/e2aa4bc33cca785cab8bdadffc58a4a30b245854/tests/syntax-tests/source/Markdown/example.md"; + hash = "sha256-VYYwgRFY1c2DPY7yGM8oF3zG4rtEpBWyqfPwmGZIkcA="; + }; + }; + }; +}