diff options
author | Jamy <jamy@jamygolden.com> | 2022-06-25 02:12:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 02:12:52 +0200 |
commit | 0fca56efdc43ef878d9aead0bb1254154f316757 (patch) | |
tree | 9a8a7fba65b183da11b53fc3f2a900713ab4d740 | |
parent | b97803edefe1d486530ba1a526ba261d784c81fc (diff) |
Use base16-builder-go to generate colorschemes (#58)
- Update contribution information
- Add bug report and feature request templates
- Ensure a max of 72 chars per line in markdown files
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 39 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.md | 24 | ||||
-rw-r--r-- | .github/workflows/update.yml | 21 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | CONTRIBUTING.md | 70 | ||||
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | README.md | 76 |
7 files changed, 151 insertions, 110 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ba1e400..dc0e021 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,30 +2,37 @@ name: Bug report about: Create a report to help us improve title: "[Bug report] " -labels: '' -assignees: '' - +labels: ["bug"] +assignees: + - base16-project/vim --- -**Describe the bug** +## Describe the bug + <!-- A clear and concise description of what the bug is. --> -**Expected behavior** +## Expected behavior + <!-- A clear and concise description of what you expected to happen. --> -**Screenshots** +## Screenshots + <!-- If applicable, add screenshots to help explain your problem. --> -**System** -Vim or Neovim: -Vim or Neovim version: -Any other plugins you may consider relevant: +## **System** + +**Vim or Neovim:** -**Minimal configuration file** -```vim -" Add a minimal configuration file to dramatically increase -" your chances of receiving help from a maintainer. -``` +**Vim or Neovim version:** + +**Any other plugins you may consider relevant:** + +## Minimal configuration file + +<!-- Add a minimal configuration file to dramatically increase your +chances of receiving help from a maintainer. --> + +## Additional context -**Additional context** <!-- Add any other context about the problem here. --> + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d6fc74f..d9b663b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,19 +2,25 @@ name: Feature request about: Suggest an idea for this project title: "[Feature request] " -labels: '' -assignees: '' - +labels: ["feature"] +assignees: + - base16-project/vim --- -**Is your feature request related to a problem? Please describe.** +## Is your feature request related to a problem? Please describe. + <!-- A clear and concise description of what the problem is. --> -**Describe the solution you'd like** +## Describe the solution you'd like + <!-- A clear and concise description of what you want to happen. --> -**Describe alternatives you've considered** -<!-- A clear and concise description of any alternative solutions or features you've considered. --> +## Describe alternatives you've considered + +<!-- A clear and concise description of any alternative solutions or +features you've considered. --> + +## Additional context -**Additional context** -<!-- Add any other context or screenshots about the feature request here. --> +<!-- Add any other context or screenshots about the feature request +here. --> diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c8a277f..b18b58a 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,4 @@ -name: Update with the latest base16 colorschemes +name: Update with the latest base16-project/base16-schemes on: workflow_dispatch: schedule: @@ -8,20 +8,18 @@ jobs: run: runs-on: ubuntu-latest steps: - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Upgrade pip - run: python -m pip install --upgrade pip - - name: Install pybase16 - run: pip install pybase16-builder - name: Fetch the repository code uses: actions/checkout@v3 with: token: ${{ secrets.BOT_ACCESS_TOKEN }} - - name: Run make - run: make + - name: Fetch the schemes repository + uses: actions/checkout@v3 + with: + repository: base16-project/base16-schemes + path: schemes + token: ${{ secrets.BOT_ACCESS_TOKEN }} + - name: Update schemes + uses: base16-project/base16-builder-go@latest - name: Commit the changes, if any uses: stefanzweifel/git-auto-commit-action@v4 with: @@ -30,4 +28,3 @@ jobs: commit_user_name: base16-project-bot commit_user_email: base16themeproject@proton.me commit_author: base16-project-bot <base16themeproject@proton.me> - @@ -1,10 +1 @@ -sources schemes -sources.yaml - -templates/* - -!/templates/config.yaml -!/templates/default.mustache - -.venv diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 382d0e1..9f459b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,39 +1,67 @@ # Contributing +This repository includes a [GitHub Action][4] that builds the +colorschemes once a week. This keeps the colorschemes up-to-date +automatically. + ## Building -Dependencies: +### Dependencies + +- `>=0.2.0` [base16-builder-go][1] +- golang `>=1.16` to build base16-builder-go -- Python, at least version 3.5 -- The `pybase16` command from - [base16-builder-python](https://github.com/InspectorMustache/base16-builder-python) -- The `make` command +### Usage for template editing -For example on a Debian-based distribution: +1. Clone [base16-builder-go][1] somewhere on your system. +1. Run `cd /path/to/base-builder-go && go build` to generate a binary: +`/path/to/base-builder-go/base16-builder-go` +1. Now execute the binary you generated while giving the `-template-dir` +arg the path to `base16-vim` repository: `./base16-builder-go +-template-dir ../base16-vim` +Or the above steps represented in shell commands: + +```shell +cd /path/to/base16-vim/../ # This repos parent dir +git clone git@github.com:base16-project/base16-builder-go.git +cd base16-builder-go +go build ./base16-builder-go/base16-builder-go \ + -template-dir ../base16-vim ``` -# Install dependencies (you probably already have pip/pip3 and make) -apt install build-essential # for make -pip3 install pybase16-builder -# Build the packages -make +### Usage for adding or editing a colorscheme + +If you want to add or edit a colorscheme but want to test it out, you +simply need to pass in your local [base16-schemes][2] directory when +executing the `base16-builder-go` binary. + +```shell +base16-builder-go \ + -schemes-dir /path/to/base16-schemes \ + -template-dir /path/to/base16-vim ``` -## Submitting a PR +If you have more questions about [base16-builder-go][1], have a look at +the information on the GitHub page. -After you've installed the build dependencies, and before you submit your PR: +## Submitting a PR -- Run `make` after you've made your changes. This will build all the themes - based on the changes you've made. For instance, instead of manually editing - files under `colors/`, you should edit `templates/default.mustache` -- Make sure to commit the changes from `make` and include them in your PR. -- Please abide by what's requested in the [PR - template](/.github/pull_request_template.md). +- Run the colorscheme generation using [base16-builder-go][1] and commit + the changes in your PR. Don't make changes directly to the generated + colorschemes, make changes to the template instead. +- Please abide by what's requested in the [PR template][4]. ## Submitting an issue Please follow the instructions in the issue templates: -- [Issue template for bug reports](/.github/ISSUE_TEMPLATE/bug_report.md) -- [Issue template for feature requests](/.github/ISSUE_TEMPLATE/feature_request.md) +- [Issue template for bug reports][5] +- [Issue template for feature requests][6] + +[1]: https://github.com/base16-project/base16-builder-go +[2]: https://github.com/base16-project/base16-schemes +[3]: .github/workflows/update.yml +[4]: .github/pull_request_template.md +[5]: .github/ISSUE_TEMPLATE/bug_report.md +[6]: .github/ISSUE_TEMPLATE/feature_request.md diff --git a/Makefile b/Makefile deleted file mode 100644 index 555bdfc..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Ref: https://github.com/theova/base16-qutebrowser -.PHONY: all clean update build - -BUILD=pybase16 -REPO=$(shell pwd) -TEMPLATE=$(shell basename ${REPO}) -THEME_DIR=colors -TEMPLATE_DIR=templates -OUTPUT=output - -all: update build - -update: - $(BUILD) update - -build: - $(BUILD) build -t ${REPO} -o ${OUTPUT} - rm -rf ${THEME_DIR} - mv ${OUTPUT}/${TEMPLATE}/${THEME_DIR}/ ${THEME_DIR}/ - -clean: - rm -rf ${OUTPUT} ${TEMPLATE_DIR}/*/ @@ -1,26 +1,29 @@ # Base16 Vim -This theme was built with [base16-builder-python](https://github.com/InspectorMustache/base16-builder-python). +Supports console [Vim][1], graphical Vim and [Neovim][2]. Supports graphical Vim and console Vim. -Over [70 themes](https://github.com/base16-project/base16-schemes) plus light/dark variations are available. Here are some of our favorites: +Over [200 themes][3] plus light/dark variations are available. Here are +some of our favorites: The `classic-dark` theme: -![base16-vim classic-dark](/screenshots/base16-vim-screenshot-classic-dark.png) +![base16-vim classic-dark][10] The `horizon-dark` theme: -![base16-vim horizon-dark](/screenshots/base16-vim-screenshot-horizon-dark.png) +![base16-vim horizon-dark][11] The `onedark` theme: -![base16-vim onedark](/screenshots/base16-vim-screenshot-onedark.png) +![base16-vim onedark][12] ## Terminal Themes -For terminal Vim (non-gui) please ensure you are using a base16 terminal theme. Have a look at the list of [official](https://github.com/base16-project/base16#official-templates) and [unofficial](https://github.com/base16-project/base16#unofficial-templates) themes for your terminal of choice. +For terminal Vim (non-gui) please ensure you are using a base16 terminal +theme. Have a look at the list of [official][4] and [unofficial][5] +themes for your terminal of choice. ## Installation @@ -67,20 +70,27 @@ cp base16/colors/*.vim . ## 256 colorspace -If using a Base16 terminal theme designed to keep the 16 ANSI colors intact (a "256" variation) **and** have sucessfully modified your 256 colorspace with [base16-shell](https://github.com/base16-project/base16-shell) you'll need to add the following to your `~/.vimrc` **before** the colorsheme declaration. +If using a Base16 terminal theme designed to keep the 16 ANSI colors +intact (a "256" variation) **and** have sucessfully modified your 256 +colorspace with [base16-shell][6] you'll need to add the following to +your `~/.vimrc` **before** the colorsheme declaration. - let base16colorspace=256 " Access colors present in 256 colorspace +```vim +let base16colorspace=256 " Access colors present in 256 colorspace +``` -This will cause vim to access the colours in the modified 256 colorspace. Please **do not** enable this simply because you have a 256 color terminal as this will cause colors to be displayed incorrectly. +This will cause vim to access the colours in the modified 256 +colorspace. Please **do not** enable this simply because you have a 256 +color terminal as this will cause colors to be displayed incorrectly. ## Troubleshooting -There is a script to help troubleshoot colour issues called `colortest` available in the [Base16 Shell](https://github.com/base16-project/base16-shell) repository. +There is a script to help troubleshoot colour issues called `colortest` +available in the [Base16 Shell][6] repository. -If you are using a ISO-8613-3 compatible terminal ( -[vim docs](https://github.com/vim/vim/blob/23c1b2b018c8121ca5fcc247e37966428bf8ca66/runtime/doc/options.txt#L7876), -[neovim docs](https://neovim.io/doc/user/options.html#'termguicolors')), and -you see a green or blue line, try to enable `termguicolors`: +If you are using a ISO-8613-3 compatible terminal ([vim docs][7], +[neovim docs][8]), and you see a green or blue line, try to enable +`termguicolors`: ```vim set termguicolors @@ -88,19 +98,28 @@ set termguicolors ### Green line numbers -![green line numbers screenshot](/screenshots/without-base16colorspace-256-with-256-terminal-theme.png) +![green line numbers screenshot][13] -If your Vim looks like the above image you are using a 256 terminal theme without setting `let base16colorspace=256` in your `~/.vimrc`. Either set `let base16colorspace=256` in your `~/.vimrc` or use a non 256 terminal theme. +If your Vim looks like the above image you are using a 256 terminal +theme without setting `let base16colorspace=256` in your `~/.vimrc`. +Either set `let base16colorspace=256` in your `~/.vimrc` or use a non +256 terminal theme. ### Blue line numbers -![blue line numbers screenshot](/screenshots/with-base16colorspace-256-without-base16-shell.png) +![blue line numbers screenshot][14] -If your Vim looks like the above image you are setting `let base16colorspace=256` in your `~/.vimrc` but either not running [Base16 Shell](https://github.com/base16-project/base16-shell) or [Base16 Shell](https://github.com/base16-project/base16-shell) is not working for your terminal. Either ensure [Base16 Shell](https://github.com/base16-project/base16-shell) is working by running the `colortest` available in the [Base16 Shell](https://github.com/base16-project/base16-shell) repository or not setting `let base16colorspace=256` in your `~/.vimrc`. +If your Vim looks like the above image you are setting `let +base16colorspace=256` in your `~/.vimrc` but either not running [Base16 +Shell][6] or [Base16 Shell][6] is not working for your terminal. Either +ensure [Base16 Shell][6] is working by running the `colortest` available +in the [Base16 Shell][6] repository or not setting `let +base16colorspace=256` in your `~/.vimrc`. ## Customization -If you want to do some local customization, you can add something like this to your `~/.vimrc`: +If you want to do some local customization, you can add something like +this to your `~/.vimrc`: ```vim function! s:base16_customize() abort @@ -115,5 +134,20 @@ augroup END ## Contributing -See [`CONTRIBUTING.md`](/CONTRIBUTING.md), which contains building and -contributing instructions. +See [`CONTRIBUTING.md`][9], which contains building and contributing +instructions. + +[1]: https://github.com/vim/vim +[2]: https://github.com/neovim/neovim +[3]: https://github.com/base16-project/base16-schemes +[4]: https://github.com/base16-project/base16#official-templates +[5]: https://github.com/base16-project/base16#unofficial-templates +[6]: https://github.com/base16-project/base16-shell +[7]: https://github.com/vim/vim/blob/23c1b2b018c8121ca5fcc247e37966428bf8ca66/runtime/doc/options.txt#L7876 +[8]: https://neovim.io/doc/user/options.html#'termguicolors' +[9]: CONTRIBUTING.md +[10]: screenshots/base16-vim-screenshot-classic-dark.png +[11]: screenshots/base16-vim-screenshot-horizon-dark.png +[12]: screenshots/base16-vim-screenshot-onedark.png +[13]: screenshots/without-base16colorspace-256-with-256-terminal-theme.png +[14]: screenshots/with-base16colorspace-256-without-base16-shell.png |