Skip to content

Commit

Permalink
Merge branch 'catppuccin:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvinsh authored Sep 18, 2023
2 parents 91a201f + 85e9360 commit 341cfe5
Show file tree
Hide file tree
Showing 128 changed files with 4,994 additions and 2,254 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

88 changes: 37 additions & 51 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Bug report
description: Report a problem with Catppuccin
labels: [bug]
body:
- type: markdown
attributes:
value: |
Before reporting: Read [Announcement and breaking changes](https://github.com/catppuccin/nvim/issues/260) and PLEASE UPDATE if you use neovim nightly.
- type: textarea
attributes:
label: "Description"
Expand All @@ -18,36 +14,45 @@ body:
description: "Output of `nvim --version` (Catppuccin requires neovim >= 0.8)"
render: markdown
placeholder: |
NVIM v0.8.0-dev-1025-gfb39bba5a6
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
validations:
required: true
- type: input
attributes:
label: "Operating system and version"
placeholder: "macOS 11.5"
label: "Terminal and multiplexer"
placeholder: "kitty 0.29.2 with tmux 3.3a"
validations:
required: true
- type: markdown
attributes:
value: |
# FOR TMUX USERS
FOLLOW THESE GIST BEFORE OPENING THE ISSUE
- [Enable true color support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) to fix the [abnormal colors](https://github.com/catppuccin/nvim/issues/415)
- [Enable italic font support](https://gist.github.com/gyribeiro/4192af1aced7a1b555df06bd3781a722) to fix the [incorrect if, then, else, end highlights](https://github.com/catppuccin/nvim/issues/428)
- type: input
attributes:
label: "Catppuccin version / branch / rev"
placeholder: "catppuccin v0.2"
placeholder: "catppuccin v1.4.0"
validations:
required: true
- type: textarea
attributes:
label: "Steps to reproduce"
description: "Steps to reproduce using the minimal config provided below."
placeholder: |
1. `nvim -nu minimal.lua`
1. `nvim -u repro.lua`
2. ...
validations:
required: true
- type: textarea
attributes:
label: "Expected behavior"
description: "A description of the behavior you expected:"
validations:
required: true
- type: textarea
attributes:
label: "Actual behavior"
Expand All @@ -56,52 +61,33 @@ body:
required: true
- type: textarea
attributes:
label: "Minimal config"
description: "Minimal(!) configuration necessary to reproduce the issue. Save this as `minimal.lua`. If _absolutely_ necessary, add plugins and config options from your `init.lua` at the indicated lines."
render: Lua
label: Repro
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
value: |
-- `minimal.lua` used for reproducible configuration
-- Open with `nvim --clean -u minimal.lua`
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
local is_windows = vim.fn.has("win32") == 1
local function join(...)
local sep = is_windows and "\\" or "/"
return table.concat({ ... }, sep)
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local root_tmp = is_windows and os.getenv("TEMP") or "/tmp"
local site_path = join(root_tmp, "nvim", "site")
local pack_path = join(site_path, "pack")
local install_path = join(pack_path, "packer", "start", "packer.nvim")
local compile_path = join(install_path, "plugin", "packer_compiled.lua")
vim.opt.packpath = site_path
local function load_plugins()
local packer = require("packer")
local use = packer.use
packer.reset()
packer.init({ compile_path = compile_path, package_root = pack_path })
use("wbthomason/packer.nvim")
use({ "catppuccin/nvim", as = "catppuccin" })
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
packer.install()
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
_G.load_config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
require("catppuccin").setup({
flavour = "mocha"
})
vim.api.nvim_command("colorscheme catppuccin")
end
-- install plugins
local plugins = {
"catppuccin/nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
vim.cmd([[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]])
validations:
required: true
vim.cmd.colorscheme("catppuccin")
-- add anything else here
render: Lua
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://discord.com/invite/r6Mdz5dpFc
about: Join our discord server for real-time answer and more!
url: https://discord.com/servers/catppuccin-907385605422448742
about: Join our discord server for real-time answers and more!
22 changes: 16 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
🎉 First off, thanks for taking the time to contribute! 🎉 Here are some guidelines from us:
🎉 First off, thanks for taking the time to contribute! 🎉

Here are some guidelines:
- Format code using [stylua](https://github.com/johnnymorganz/stylua).
- New plugin integration should be added in [alphabetical order](https://github.com/catppuccin/nvim#integrations)
- Recommendation:
- Create a topic branch on your fork for your specific PR.
- Consider using [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/) rules for creating explicit and meaningful commit messages.
- If it's your first time contributing to a project then read [About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) on Github's docs.
- New plugin integration should be added in alphabetical order:
- to the [README](https://github.com/catppuccin/nvim#integrations) (vimdoc is auto-generated).
- to [types.lua](https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/types.lua)
- to [vim.yml](https://github.com/catppuccin/nvim/blob/main/vim.yml)
- Create a topic branch on your fork for your specific PR.
- Use [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/)
rules for explicit and meaningful commit messages.
- If it's your first time contributing to a project, then read
[About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
on Github's docs.

Here are some tips:
- Use `vim.g.catppuccin_debug = true` to get live config re-loading
16 changes: 12 additions & 4 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
name: stylua
on: [push, pull_request]
name: StyLua
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main

jobs:
stylua:
name: StyLua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: JohnnyMorganz/stylua-action@v1.1.1
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check --config-path=stylua.toml .
55 changes: 55 additions & 0 deletions .github/workflows/neovim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Neovim
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main

jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install Neovim
uses: MunifTanjim/setup-neovim-action@v1
with:
tag: nightly
- name: Run neovim
run: |
nvim --version
nvim --headless -u tests/init.lua +q
macos:
name: Macos
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Install Neovim
run: |
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
xattr -c ./nvim-macos.tar.gz
tar xzvf nvim-macos.tar.gz &> /dev/null
ln -s $(pwd)/nvim-macos/bin/nvim /usr/local/bin/nvim
- name: Run neovim
run: |
nvim --version
nvim --headless -u tests/init.lua +q
windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Neovim
run: |
C:\msys64\usr\bin\wget.exe -q https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip
7z x nvim-win64.zip
Add-Content $env:GITHUB_PATH ".\nvim-win64\bin\"
- name: Run neovim
run: |
nvim --version
nvim --headless -u tests/init.lua +q
39 changes: 39 additions & 0 deletions .github/workflows/palette.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Palette

on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC

jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Make changes to pull request
run: |
curl -o /tmp/palette.json https://raw.githubusercontent.com/catppuccin/palette/main/palette.json
python -c "import json
data = json.load(open('/tmp/palette.json'))
for flavour in data:
with open('lua/catppuccin/palettes/{flavour}.lua'.format(flavour = flavour), 'w') as f:
f.write('return {\n')
for accent in data[flavour]: f.write('\t{accent} = \"{hex}\",\n'.format(accent = accent, hex = data[flavour][accent]['hex']))
f.write('}\n')"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'feat: auto-sync upstream palettes'
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: new-palettes
delete-branch: true
title: 'feat: auto-sync upstream palettes'
body: |
Auto-update `lua/catppuccin/palettes/` based on https://github.com/catppuccin/palette/blob/main/palette.json
5 changes: 3 additions & 2 deletions .github/workflows/pandocvim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
description: "Soothing pastel theme for NeoVim"
pandoc: "README.md"
toc: true
version: "nvim 0.8"
version: "nvim >= 0.8.0"
treesitter: true
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Auto generate docs"
commit_message: "docs: auto generate vimdoc"
branch: ${{ github.head_ref }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release

on:
push:
pull_request:
workflow_dispatch:

jobs:
release:
name: release
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
package-name: catppuccin
- uses: actions/checkout@v3
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable
21 changes: 21 additions & 0 deletions .github/workflows/selene.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Selene
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main

jobs:
selene:
name: Selene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run selene
uses: NTBBloodbath/selene-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --display-style=quiet .
Loading

0 comments on commit 341cfe5

Please sign in to comment.