1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,93 @@
name: Bug report
description: Report a problem with Catppuccin
labels: [bug]
body:
- type: textarea
attributes:
label: "Description"
description: "A short description of the problem you are reporting."
validations:
required: true
- type: textarea
attributes:
label: "Neovim version"
description: "Output of `nvim --version` (Catppuccin requires neovim >= 0.8)"
render: markdown
placeholder: |
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
validations:
required: true
- type: input
attributes:
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 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 -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"
description: "Observed behavior (may optionally include logs, images, or videos)."
validations:
required: true
- type: textarea
attributes:
label: Repro
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
value: |
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- 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
-- 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)
-- install plugins
local plugins = {
"catppuccin/nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("catppuccin")
-- add anything else here
render: Lua

View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://discord.com/servers/catppuccin-907385605422448742
about: Join our discord server for real-time answers and more!

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: "Suggest an idea for the project"
title: ""
labels: enhancement
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
Ex. I'm always frustrated when [...]. My workflow is like this [...]
**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.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -0,0 +1,16 @@
🎉 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:
- 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)
- 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

View File

@ -0,0 +1,14 @@
import json
import urllib.request
url = "https://github.com/catppuccin/palette/raw/main/palette.json"
with urllib.request.urlopen(url) as response:
flavors = json.loads(response.read().decode())
for flavor in flavors:
with open(f"lua/catppuccin/palettes/{flavor}.lua", "w") as f:
f.write("return {\n")
for color in flavors[flavor]["colors"]:
f.write(f'\t{color} = "{flavors[flavor]["colors"][color]["hex"]}",\n')
f.write("}\n")

View File

@ -0,0 +1,20 @@
name: StyLua
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main
jobs:
stylua:
name: StyLua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check --config-path=stylua.toml .

View File

@ -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@v4
- 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@v4
- name: Install Neovim
run: |
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz
xattr -c ./nvim-macos-x86_64.tar.gz
tar xzvf nvim-macos-x86_64.tar.gz &> /dev/null
ln -s $(pwd)/nvim-macos-x86_64/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@v4
- 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

View File

@ -0,0 +1,30 @@
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@v4
- name: Make changes to pull request
run: python3 ./.github/scripts/update-palette.py
- 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

View File

@ -0,0 +1,26 @@
name: panvimdoc
on:
push:
paths:
- '**.md'
jobs:
docs:
runs-on: ubuntu-latest
name: pandoc to vimdoc
steps:
- uses: actions/checkout@v4
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: catppuccin
description: "Soothing pastel theme for NeoVim"
pandoc: "README.md"
toc: true
version: "nvim >= 0.8.0"
treesitter: true
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "docs: auto generate vimdoc"
branch: ${{ github.head_ref }}

View File

@ -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@v4
- 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

View File

@ -0,0 +1,42 @@
---
name: Tests
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC
jobs:
ubuntu:
name: Plenary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: nvim
- uses: actions/checkout@v4
with:
ref: user-configs
path: user-configs
- run: |
mv user-configs/tests/* nvim/tests/
- name: Install Neovim
uses: MunifTanjim/setup-neovim-action@v1
with:
tag: nightly
- name: Fetch dependencies
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
- name: Run tests
working-directory: ./nvim
run: |
nvim --version
[ ! -d tests ] && exit 0
nvim --headless -u tests/minimal_init.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.vim', sequential = true}"

View File

@ -0,0 +1,58 @@
---
name: Vim
on:
pull_request:
push:
paths-ignore:
- "*.md"
branches:
- main
jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Vim
shell: bash
run: |
sudo apt-get update
sudo apt-get install vim-gtk lua5.4
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- name: Run vim
run: |
vim --version
vim -u tests/init.vim
macos:
name: Macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Vim
run: |
brew install vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- name: Run vim
run: |
vim --version
vim -u tests/init.vim
windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Vim
run: |
choco install vim
C:\msys64\usr\bin\wget.exe -q https://downloads.sourceforge.net/project/luabinaries/5.4.2/Tools%20Executables/lua-5.4.2_Win64_bin.zip
7z x lua-5.4.2_Win64_bin.zip
move lua54.dll C:\Windows\System32\
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni $HOME/vimfiles/autoload/plug.vim -Force
- name: Run vim
run: |
vim --version
gvim -u tests/init.vim