diff --git a/.gitignore b/.gitignore index 3ffae32..686ad3d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ debug .vscode .settings .idea +.tests/ diff --git a/README.md b/README.md index 88d64e7..90f4059 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ How to create a new extra template: plugin directory: ```sh - nvim --headless "+lua require('modus-themes.extras').setup()" +qa + ./scripts/extras.sh ``` 4. Ensure the newly created themes in the `extras/` directory are correct. Please **DO diff --git a/scripts/extras.sh b/scripts/extras.sh new file mode 100755 index 0000000..07ea4b7 --- /dev/null +++ b/scripts/extras.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +nvim -u tests/minit.lua --headless +"lua require('modus-themes.extras').setup()" +qa diff --git a/tests/minit.lua b/tests/minit.lua new file mode 100644 index 0000000..97cc2e9 --- /dev/null +++ b/tests/minit.lua @@ -0,0 +1,15 @@ +#!/usr/bin/env -S nvim -l + +vim.env.LAZY_STDPATH = ".tests" +vim.env.LAZY_PATH = vim.fs.normalize("~/projects/lazy.nvim") +load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() + +-- Setup lazy +require("lazy.minit").setup({ + spec = { + { + dir = vim.uv.cwd(), + opts = {}, + }, + }, +})