Skip to content

Commit

Permalink
feat(extras): add automatic generation of extras with templating
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 12, 2024
1 parent ad99418 commit ea520a7
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 268 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/astrotheme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: AstroTheme
on:
push:
branches: [main]
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
nvim-version: ["stable", "nightly"]
name: Test Neovim ${{ matrix.nvim-version }}
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim-version }}
- run: make test
build:
runs-on: ubuntu-latest
name: Build Extras
needs: tests
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
- run: make extras
- name: Push changes
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "extras/*"
commit_message: "chore(extras): auto-generate extras"
commit_user_name: "astronvimbot"
commit_user_email: "github@astronvim.com"
commit_author: "AstroNvim Bot <github@astronvim.com>"
20 changes: 0 additions & 20 deletions .github/workflows/tests.yml

This file was deleted.

5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
TESTS_DIR=tests/

.PHONY: test

test:
@nvim -l ${TESTS_DIR}/minit.lua --busted ${TESTS_DIR} -o utfTerminal

.PHONY: extras
extras:
@nvim -u ${TESTS_DIR}/minit.lua --headless +"lua require('astrotheme.extras').setup()" +qa
15 changes: 3 additions & 12 deletions extras/wezterm/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# Wezterm
1. Copy either `wezterm_astrodark.toml` or `wezterm_astrodark.lua` to `~/.config/wezterm/colors`
2. Add either options to your Wezterm config.

## If you want to use astrodark.toml
```lua
return {
color_scheme = "Astrodark",
}
```
1. Copy the `toml` files to `~/.config/wezterm/colors/`
2. Add the following to your Wezterm config.

## If you want to use astrodark.lua
```lua
local astrodark = require("colors/astrodark")
return {
colors = astrodark.colors(),
window_frame = astrodark.window_frame(),
color_scheme = "astrotheme_astrodark", -- or whichever palette you want
}
```
156 changes: 0 additions & 156 deletions extras/wezterm/wezterm_astrodark.lua

This file was deleted.

79 changes: 0 additions & 79 deletions extras/wezterm/wezterm_astrodark.toml

This file was deleted.

Loading

0 comments on commit ea520a7

Please sign in to comment.