├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── formatting.yml │ ├── neovim.yml │ ├── pandocvim.yml │ ├── release.yml │ ├── tests.yml │ └── vim.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── after └── queries │ ├── css │ └── highlights.scm │ ├── javascript │ └── highlights.scm │ └── typescript │ └── highlights.scm ├── autoload ├── airline │ └── themes │ │ └── catppuccin.vim ├── clap │ └── themes │ │ └── catppuccin.vim └── lightline │ └── colorscheme │ └── catppuccin.vim ├── colors ├── catppuccin-frappe.vim ├── catppuccin-latte.vim ├── catppuccin-macchiato.vim ├── catppuccin-mocha.vim └── catppuccin.vim ├── doc └── catppuccin.txt ├── justfile ├── lua ├── barbecue │ └── theme │ │ ├── catppuccin-frappe.lua │ │ ├── catppuccin-latte.lua │ │ ├── catppuccin-macchiato.lua │ │ ├── catppuccin-mocha.lua │ │ └── catppuccin.lua ├── catppuccin │ ├── groups │ │ ├── editor.lua │ │ ├── integrations │ │ │ ├── aerial.lua │ │ │ ├── alpha.lua │ │ │ ├── avante.lua │ │ │ ├── barbar.lua │ │ │ ├── beacon.lua │ │ │ ├── blink_cmp.lua │ │ │ ├── bufferline.lua │ │ │ ├── cmp.lua │ │ │ ├── coc_nvim.lua │ │ │ ├── colorful_winsep.lua │ │ │ ├── copilot_vim.lua │ │ │ ├── dadbod_ui.lua │ │ │ ├── dap.lua │ │ │ ├── dap_ui.lua │ │ │ ├── dashboard.lua │ │ │ ├── diffview.lua │ │ │ ├── dropbar.lua │ │ │ ├── feline.lua │ │ │ ├── fern.lua │ │ │ ├── fidget.lua │ │ │ ├── flash.lua │ │ │ ├── fzf.lua │ │ │ ├── gitgraph.lua │ │ │ ├── gitgutter.lua │ │ │ ├── gitsigns.lua │ │ │ ├── grug_far.lua │ │ │ ├── harpoon.lua │ │ │ ├── headlines.lua │ │ │ ├── hop.lua │ │ │ ├── illuminate.lua │ │ │ ├── indent_blankline.lua │ │ │ ├── leap.lua │ │ │ ├── lightspeed.lua │ │ │ ├── lir.lua │ │ │ ├── lsp_saga.lua │ │ │ ├── lsp_trouble.lua │ │ │ ├── markdown.lua │ │ │ ├── markview.lua │ │ │ ├── mason.lua │ │ │ ├── mini.lua │ │ │ ├── native_lsp.lua │ │ │ ├── navic.lua │ │ │ ├── neogit.lua │ │ │ ├── neotest.lua │ │ │ ├── neotree.lua │ │ │ ├── noice.lua │ │ │ ├── notifier.lua │ │ │ ├── notify.lua │ │ │ ├── nvim_surround.lua │ │ │ ├── nvimtree.lua │ │ │ ├── octo.lua │ │ │ ├── overseer.lua │ │ │ ├── pounce.lua │ │ │ ├── rainbow_delimiters.lua │ │ │ ├── render_markdown.lua │ │ │ ├── sandwich.lua │ │ │ ├── semantic_tokens.lua │ │ │ ├── signify.lua │ │ │ ├── snacks.lua │ │ │ ├── symbols_outline.lua │ │ │ ├── telekasten.lua │ │ │ ├── telescope.lua │ │ │ ├── treesitter.lua │ │ │ ├── treesitter_context.lua │ │ │ ├── ts_rainbow.lua │ │ │ ├── ts_rainbow2.lua │ │ │ ├── ufo.lua │ │ │ ├── vim_sneak.lua │ │ │ ├── vimwiki.lua │ │ │ ├── which_key.lua │ │ │ └── window_picker.lua │ │ ├── syntax.lua │ │ └── terminal.lua │ ├── init.lua │ ├── lib │ │ ├── compiler.lua │ │ ├── hashing.lua │ │ ├── highlighter.lua │ │ ├── hsluv.lua │ │ ├── mapper.lua │ │ └── vim │ │ │ ├── bit.lua │ │ │ ├── compiler.lua │ │ │ └── init.lua │ ├── palettes │ │ ├── frappe.lua │ │ ├── init.lua │ │ ├── latte.lua │ │ ├── macchiato.lua │ │ └── mocha.lua │ ├── types.lua │ └── utils │ │ ├── barbecue.lua │ │ ├── colors.lua │ │ ├── lualine.lua │ │ └── reactive.lua ├── lualine │ └── themes │ │ ├── catppuccin-frappe.lua │ │ ├── catppuccin-latte.lua │ │ ├── catppuccin-macchiato.lua │ │ ├── catppuccin-mocha.lua │ │ └── catppuccin.lua └── reactive │ └── presets │ ├── catppuccin-frappe-cursor.lua │ ├── catppuccin-frappe-cursorline.lua │ ├── catppuccin-latte-cursor.lua │ ├── catppuccin-latte-cursorline.lua │ ├── catppuccin-macchiato-cursor.lua │ ├── catppuccin-macchiato-cursorline.lua │ ├── catppuccin-mocha-cursor.lua │ └── catppuccin-mocha-cursorline.lua ├── nvim.tera ├── renovate.json ├── stylua.toml └── tests ├── flavour_spec.lua ├── hash_spec.lua ├── init.lua ├── init.vim ├── minimal_init.vim └── palette_spec.lua /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # EditorConfig is awesome: https://EditorConfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | insert_final_newline = true 11 | 12 | [*.{lua,tera}] 13 | indent_style = tab 14 | 15 | [*.{diff,md}] 16 | trim_trailing_whitespace = false 17 | indent_style = space 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: Report a problem with Catppuccin 3 | labels: [bug] 4 | body: 5 | - type: textarea 6 | attributes: 7 | label: "Description" 8 | description: "A short description of the problem you are reporting." 9 | validations: 10 | required: true 11 | - type: textarea 12 | attributes: 13 | label: "Neovim version" 14 | description: "Output of `nvim --version` (Catppuccin requires neovim >= 0.8)" 15 | render: markdown 16 | placeholder: | 17 | NVIM v0.9.0 18 | Build type: Release 19 | LuaJIT 2.1.0-beta3 20 | validations: 21 | required: true 22 | - type: input 23 | attributes: 24 | label: "Terminal and multiplexer" 25 | placeholder: "kitty 0.29.2 with tmux 3.3a" 26 | validations: 27 | required: true 28 | - type: markdown 29 | attributes: 30 | value: | 31 | # FOR TMUX USERS 32 | FOLLOW THESE GIST BEFORE OPENING THE ISSUE 33 | - [Enable true color support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) to fix the [abnormal colors](https://github.com/catppuccin/nvim/issues/415) 34 | - [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) 35 | - type: input 36 | attributes: 37 | label: "Catppuccin version / branch / rev" 38 | placeholder: "catppuccin v1.4.0" 39 | validations: 40 | required: true 41 | - type: textarea 42 | attributes: 43 | label: "Steps to reproduce" 44 | description: "Steps to reproduce using the minimal config provided below." 45 | placeholder: | 46 | 1. `nvim -u repro.lua` 47 | 2. ... 48 | validations: 49 | required: true 50 | - type: textarea 51 | attributes: 52 | label: "Expected behavior" 53 | description: "A description of the behavior you expected:" 54 | validations: 55 | required: true 56 | - type: textarea 57 | attributes: 58 | label: "Actual behavior" 59 | description: "Observed behavior (may optionally include logs, images, or videos)." 60 | validations: 61 | required: true 62 | - type: textarea 63 | attributes: 64 | label: Repro 65 | description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua` 66 | value: | 67 | -- DO NOT change the paths and don't remove the colorscheme 68 | local root = vim.fn.fnamemodify("./.repro", ":p") 69 | 70 | -- set stdpaths to use .repro 71 | for _, name in ipairs({ "config", "data", "state", "cache" }) do 72 | vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name 73 | end 74 | 75 | -- bootstrap lazy 76 | local lazypath = root .. "/plugins/lazy.nvim" 77 | if not vim.loop.fs_stat(lazypath) then 78 | vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }) 79 | end 80 | vim.opt.runtimepath:prepend(lazypath) 81 | 82 | -- install plugins 83 | local plugins = { 84 | "catppuccin/nvim", 85 | -- add any other plugins here 86 | } 87 | require("lazy").setup(plugins, { 88 | root = root .. "/plugins", 89 | }) 90 | 91 | vim.cmd.colorscheme("catppuccin") 92 | -- add anything else here 93 | render: Lua 94 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Question 4 | url: https://discord.com/servers/catppuccin-907385605422448742 5 | about: Join our discord server for real-time answers and more! 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: "Suggest an idea for the project" 4 | title: "" 5 | labels: enhancement 6 | assignees: "" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. 11 | Ex. I'm always frustrated when [...]. My workflow is like this [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 🎉 First off, thanks for taking the time to contribute! 🎉 2 | 3 | Here are some guidelines: 4 | - Format code using [stylua](https://github.com/johnnymorganz/stylua). 5 | - New plugin integration should be added in alphabetical order: 6 | - to the [README](https://github.com/catppuccin/nvim#integrations) (vimdoc is auto-generated). 7 | - to [types.lua](https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/types.lua) 8 | - Create a topic branch on your fork for your specific PR. 9 | - Use [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/) 10 | rules for explicit and meaningful commit messages. 11 | - If it's your first time contributing to a project, then read 12 | [About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 13 | on Github's docs. 14 | 15 | Here are some tips: 16 | - Use `vim.g.catppuccin_debug = true` to get live config re-loading 17 | -------------------------------------------------------------------------------- /.github/workflows/formatting.yml: -------------------------------------------------------------------------------- 1 | name: StyLua 2 | on: 3 | pull_request: 4 | push: 5 | paths-ignore: 6 | - "*.md" 7 | branches: 8 | - main 9 | 10 | jobs: 11 | stylua: 12 | name: StyLua 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: JohnnyMorganz/stylua-action@v4 17 | with: 18 | token: ${{ secrets.GITHUB_TOKEN }} 19 | version: latest 20 | args: --check --config-path=stylua.toml . 21 | -------------------------------------------------------------------------------- /.github/workflows/neovim.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Neovim 3 | on: 4 | pull_request: 5 | push: 6 | paths-ignore: 7 | - "*.md" 8 | branches: 9 | - main 10 | 11 | jobs: 12 | ubuntu: 13 | name: Ubuntu 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Install Neovim 19 | uses: MunifTanjim/setup-neovim-action@v1 20 | with: 21 | tag: nightly 22 | - name: Run neovim 23 | run: | 24 | nvim --version 25 | nvim --headless -u tests/init.lua +q 26 | macos: 27 | name: Macos 28 | runs-on: macos-latest 29 | 30 | steps: 31 | - uses: actions/checkout@v4 32 | - name: Install Neovim 33 | run: | 34 | wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz 35 | xattr -c ./nvim-macos-x86_64.tar.gz 36 | tar xzvf nvim-macos-x86_64.tar.gz &> /dev/null 37 | ln -s $(pwd)/nvim-macos-x86_64/bin/nvim /usr/local/bin/nvim 38 | - name: Run neovim 39 | run: | 40 | nvim --version 41 | nvim --headless -u tests/init.lua +q 42 | windows: 43 | name: Windows 44 | runs-on: windows-latest 45 | steps: 46 | - uses: actions/checkout@v4 47 | - name: Install Neovim 48 | run: | 49 | C:\msys64\usr\bin\wget.exe -q https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip 50 | 7z x nvim-win64.zip 51 | Add-Content $env:GITHUB_PATH ".\nvim-win64\bin\" 52 | - name: Run neovim 53 | run: | 54 | nvim --version 55 | nvim --headless -u tests/init.lua +q 56 | -------------------------------------------------------------------------------- /.github/workflows/pandocvim.yml: -------------------------------------------------------------------------------- 1 | name: panvimdoc 2 | 3 | on: 4 | push: 5 | paths: 6 | - '**.md' 7 | 8 | jobs: 9 | docs: 10 | runs-on: ubuntu-latest 11 | name: pandoc to vimdoc 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: panvimdoc 15 | uses: kdheepak/panvimdoc@main 16 | with: 17 | vimdoc: catppuccin 18 | description: "Soothing pastel theme for NeoVim" 19 | pandoc: "README.md" 20 | toc: true 21 | version: "nvim >= 0.8.0" 22 | treesitter: true 23 | - uses: stefanzweifel/git-auto-commit-action@v5 24 | with: 25 | commit_message: "docs: auto generate vimdoc" 26 | branch: ${{ github.head_ref }} 27 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | release: 10 | name: release 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: googleapis/release-please-action@v4 14 | id: release 15 | with: 16 | release-type: simple 17 | package-name: catppuccin 18 | - uses: actions/checkout@v4 19 | - name: tag stable versions 20 | if: ${{ steps.release.outputs.release_created }} 21 | run: | 22 | git config user.name github-actions[bot] 23 | git config user.email 41898282+github-actions[bot]@users.noreply.github.com 24 | git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git" 25 | git tag -d stable || true 26 | git push origin :stable || true 27 | git tag -a stable -m "Last Stable Release" 28 | git push origin stable 29 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Tests 3 | on: 4 | pull_request: 5 | push: 6 | paths-ignore: 7 | - "*.md" 8 | branches: 9 | - main 10 | workflow_dispatch: 11 | schedule: 12 | - cron: '0 0 * * *' # Run every day at midnight UTC 13 | 14 | jobs: 15 | ubuntu: 16 | name: Plenary 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | path: nvim 23 | - uses: actions/checkout@v4 24 | with: 25 | ref: user-configs 26 | path: user-configs 27 | - run: | 28 | mv user-configs/tests/* nvim/tests/ 29 | - name: Install Neovim 30 | uses: MunifTanjim/setup-neovim-action@v1 31 | with: 32 | tag: nightly 33 | - name: Fetch dependencies 34 | run: | 35 | git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim 36 | ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start 37 | - name: Run tests 38 | working-directory: ./nvim 39 | run: | 40 | nvim --version 41 | [ ! -d tests ] && exit 0 42 | nvim --headless -u tests/minimal_init.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.vim', sequential = true}" 43 | -------------------------------------------------------------------------------- /.github/workflows/vim.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Vim 3 | on: 4 | pull_request: 5 | push: 6 | paths-ignore: 7 | - "*.md" 8 | branches: 9 | - main 10 | 11 | jobs: 12 | ubuntu: 13 | name: Ubuntu 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Install Vim 19 | shell: bash 20 | run: | 21 | sudo apt-get update 22 | sudo apt-get install vim-gtk3 lua5.4 23 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 24 | - name: Run vim 25 | run: | 26 | vim --version 27 | vim -u tests/init.vim 28 | macos: 29 | name: Macos 30 | runs-on: macos-latest 31 | 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: Install Vim 35 | run: | 36 | brew install vim 37 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 38 | - name: Run vim 39 | run: | 40 | vim --version 41 | vim -u tests/init.vim 42 | windows: 43 | name: Windows 44 | runs-on: windows-latest 45 | steps: 46 | - uses: actions/checkout@v4 47 | - name: Install Vim 48 | run: | 49 | choco install vim 50 | 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 51 | 7z x lua-5.4.2_Win64_bin.zip 52 | move lua54.dll C:\Windows\System32\ 53 | iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` 54 | ni $HOME/vimfiles/autoload/plug.vim -Force 55 | - name: Run vim 56 | run: | 57 | vim --version 58 | gvim -u tests/init.vim 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | doc/tags 2 | .vscode/ 3 | .DS_Store 4 | .repro 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Catppuccin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /after/queries/css/highlights.scm: -------------------------------------------------------------------------------- 1 | ;; extends 2 | [ 3 | (class_name) 4 | ] @property.class 5 | 6 | [ 7 | (id_name) 8 | ] @property.id 9 | 10 | [ 11 | (declaration 12 | (plain_value) @string.plain) 13 | ] 14 | [ 15 | (tag_name) 16 | ] @type.tag 17 | -------------------------------------------------------------------------------- /after/queries/javascript/highlights.scm: -------------------------------------------------------------------------------- 1 | ;; extends 2 | [ 3 | "export" 4 | ] @keyword.export 5 | -------------------------------------------------------------------------------- /after/queries/typescript/highlights.scm: -------------------------------------------------------------------------------- 1 | ;; extends 2 | [ 3 | "export" 4 | ] @keyword.export 5 | -------------------------------------------------------------------------------- /autoload/airline/themes/catppuccin.vim: -------------------------------------------------------------------------------- 1 | let g:airline#themes#catppuccin#palette = {} 2 | 3 | function! airline#themes#catppuccin#refresh() 4 | let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())') 5 | 6 | " Normal mode 7 | " (Dark) 8 | let s:N1 = [ s:c.mantle, s:c.blue, 59, 149 ] " guifg guibg ctermfg ctermbg 9 | let s:N2 = [ s:c.blue, s:c.surface0, 149, 59 ] " guifg guibg ctermfg ctermbg 10 | let s:N3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg 11 | 12 | " Insert mode 13 | let s:I1 = [ s:c.mantle, s:c.teal, 59, 74 ] " guifg guibg ctermfg ctermbg 14 | let s:I2 = [ s:c.teal, s:c.surface0, 74, 59 ] " guifg guibg ctermfg ctermbg 15 | let s:I3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg 16 | 17 | " Visual mode 18 | let s:V1 = [ s:c.mantle, s:c.mauve, 59, 209 ] " guifg guibg ctermfg ctermbg 19 | let s:V2 = [ s:c.mauve, s:c.surface0, 209, 59 ] " guifg guibg ctermfg ctermbg 20 | let s:V3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg 21 | 22 | " Replace mode 23 | let s:R1 = [ s:c.mantle, s:c.red, 59, 203 ] " guifg guibg ctermfg ctermbg 24 | let s:R2 = [ s:c.red, s:c.surface0, 203, 59 ] " guifg guibg ctermfg ctermbg 25 | 26 | " Command mode 27 | let s:C1 = [ s:c.base, s:c.peach, 59, 166 ] " guifg guibg ctermfg ctermbg 28 | let s:C2 = [ s:c.peach, s:c.surface0, 166, 59 ] " guifg guibg ctermfg ctermbg 29 | 30 | " Warning section 31 | let s:WR = [s:c.mantle, s:c.peach, 232, 166 ] 32 | 33 | " Error section 34 | let s:ER = [s:c.mantle, s:c.red, 232, 166 ] 35 | 36 | 37 | let g:airline#themes#catppuccin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) 38 | 39 | let g:airline#themes#catppuccin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) 40 | 41 | let g:airline#themes#catppuccin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) 42 | 43 | let s:IA = [ s:N1[1], s:N3[1], s:N1[3], s:N3[3], '' ] 44 | let g:airline#themes#catppuccin#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) 45 | 46 | let g:airline#themes#catppuccin#palette.normal.airline_warning = s:WR 47 | let g:airline#themes#catppuccin#palette.insert.airline_warning = s:WR 48 | let g:airline#themes#catppuccin#palette.visual.airline_warning = s:WR 49 | 50 | let g:airline#themes#catppuccin#palette.normal.airline_warning_to_airline_error = s:WR 51 | let g:airline#themes#catppuccin#palette.insert.airline_warning_to_airline_error = s:WR 52 | let g:airline#themes#catppuccin#palette.visual.airline_warning_to_airline_error = s:WR 53 | 54 | let g:airline#themes#catppuccin#palette.normal.airline_error = s:ER 55 | let g:airline#themes#catppuccin#palette.insert.airline_error = s:ER 56 | let g:airline#themes#catppuccin#palette.visual.airline_error = s:ER 57 | 58 | " Fork replace mode from insert mode 59 | let g:airline#themes#catppuccin#palette.replace = copy(g:airline#themes#catppuccin#palette.insert) 60 | let g:airline#themes#catppuccin#palette.replace.airline_a = [ s:R1[0], s:R1[1], s:R1[2], s:R1[3], '' ] 61 | let g:airline#themes#catppuccin#palette.replace.airline_b = [ s:R2[0], s:R2[1], s:R2[2], s:R2[3], '' ] 62 | 63 | " Terminal mode is same as insert mode 64 | let g:airline#themes#catppuccin#palette.terminal = copy(g:airline#themes#catppuccin#palette.insert) 65 | 66 | " Fork command mode from normal mode 67 | let g:airline#themes#catppuccin#palette.commandline = copy(g:airline#themes#catppuccin#palette.normal) 68 | let g:airline#themes#catppuccin#palette.commandline.airline_a = [ s:C1[0], s:C1[1], s:C1[2], s:C1[3], '' ] 69 | let g:airline#themes#catppuccin#palette.commandline.airline_b = [ s:C2[0], s:C2[1], s:C2[2], s:C2[3], '' ] 70 | endfunction 71 | 72 | call airline#themes#catppuccin#refresh() 73 | -------------------------------------------------------------------------------- /autoload/clap/themes/catppuccin.vim: -------------------------------------------------------------------------------- 1 | let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())') 2 | 3 | let s:p = {} 4 | 5 | let s:p.display = { 'guibg': s:c.mantle } 6 | 7 | let s:p.input = s:p.display 8 | let s:p.indicator = { 'guifg': s:c.subtext1, 'guibg': s:c.mantle } 9 | let s:p.spinner = { 'guifg': s:c.yellow, 'guibg': s:c.mantle, 'gui': "bold" } 10 | let s:p.search_text = { 'guifg': s:c.text, 'guibg': s:c.mantle, 'gui': "bold" } 11 | 12 | let s:p.preview = { 'guibg': s:c.base } 13 | 14 | let s:p.selected = { 'guifg': s:c.sapphire, 'gui': "bold,underline" } 15 | let s:p.current_selection = { 'guibg': s:c.surface0, 'gui': "bold" } 16 | 17 | let s:p.selected_sign = { 'guifg': s:c.red } 18 | let s:p.current_selection_sign = copy(s:p.selected_sign) 19 | 20 | let g:clap#themes#catppuccin#palette = s:p 21 | -------------------------------------------------------------------------------- /autoload/lightline/colorscheme/catppuccin.vim: -------------------------------------------------------------------------------- 1 | let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())') 2 | 3 | let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} 4 | let s:p.normal.left = [ [ s:c.mantle, s:c.blue ], [ s:c.blue, s:c.base ] ] 5 | let s:p.normal.middle = [ [ s:c.blue, s:c.mantle ] ] 6 | let s:p.normal.right = [ [ s:c.overlay0, s:c.base ], [ s:c.blue, s:c.surface0 ] ] 7 | let s:p.insert.left = [ [ s:c.mantle, s:c.teal ], [ s:c.blue, s:c.base ] ] 8 | let s:p.visual.left = [ [ s:c.mantle, s:c.mauve ], [ s:c.blue, s:c.base ] ] 9 | let s:p.replace.left = [ [ s:c.mantle, s:c.red ], [ s:c.blue, s:c.base ] ] 10 | 11 | let s:p.inactive.left = [ [ s:c.blue, s:c.base ], [ s:c.overlay0, s:c.base ] ] 12 | let s:p.inactive.middle = [ [ s:c.surface1, s:c.base ] ] 13 | let s:p.inactive.right = [ [ s:c.surface1, s:c.base ], [ s:c.overlay0, s:c.base ] ] 14 | 15 | let s:p.tabline.left = [ [ s:c.overlay0, s:c.base ], [ s:c.overlay0, s:c.base ] ] 16 | let s:p.tabline.tabsel = [ [ s:c.blue, s:c.surface1 ], [ s:c.overlay0, s:c.base] ] 17 | let s:p.tabline.middle = [ [ s:c.surface1, s:c.base ] ] 18 | let s:p.tabline.right = copy(s:p.inactive.right) 19 | let s:p.normal.error = [ [ s:c.mantle, s:c.red ] ] 20 | let s:p.normal.warning = [ [ s:c.mantle, s:c.yellow ] ] 21 | 22 | let g:lightline#colorscheme#catppuccin#palette = lightline#colorscheme#fill(s:p) 23 | -------------------------------------------------------------------------------- /colors/catppuccin-frappe.vim: -------------------------------------------------------------------------------- 1 | lua require("catppuccin").load "frappe" 2 | -------------------------------------------------------------------------------- /colors/catppuccin-latte.vim: -------------------------------------------------------------------------------- 1 | lua require("catppuccin").load "latte" 2 | -------------------------------------------------------------------------------- /colors/catppuccin-macchiato.vim: -------------------------------------------------------------------------------- 1 | lua require("catppuccin").load "macchiato" 2 | -------------------------------------------------------------------------------- /colors/catppuccin-mocha.vim: -------------------------------------------------------------------------------- 1 | lua require("catppuccin").load "mocha" 2 | -------------------------------------------------------------------------------- /colors/catppuccin.vim: -------------------------------------------------------------------------------- 1 | lua require("catppuccin").load() 2 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | _default: 2 | @just list 3 | 4 | build: 5 | whiskers nvim.tera 6 | -------------------------------------------------------------------------------- /lua/barbecue/theme/catppuccin-frappe.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.barbecue" "frappe" 2 | -------------------------------------------------------------------------------- /lua/barbecue/theme/catppuccin-latte.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.barbecue" "latte" 2 | -------------------------------------------------------------------------------- /lua/barbecue/theme/catppuccin-macchiato.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.barbecue" "macchiato" 2 | -------------------------------------------------------------------------------- /lua/barbecue/theme/catppuccin-mocha.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.barbecue" "mocha" 2 | -------------------------------------------------------------------------------- /lua/barbecue/theme/catppuccin.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.barbecue"() 2 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/editor.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | ColorColumn = { bg = C.surface0 }, -- used for the columns set with 'colorcolumn' 6 | Conceal = { fg = C.overlay1 }, -- placeholder characters substituted for concealed text (see 'conceallevel') 7 | Cursor = { fg = C.base, bg = C.rosewater }, -- character under the cursor 8 | lCursor = { fg = C.base, bg = C.rosewater }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') 9 | CursorIM = { fg = C.base, bg = C.rosewater }, -- like Cursor, but used when in IME mode |CursorIM| 10 | CursorColumn = { bg = C.mantle }, -- Screen-column at the cursor, when 'cursorcolumn' is set. 11 | CursorLine = { 12 | bg = U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), 13 | }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if forecrust (ctermfg OR guifg) is not set. 14 | Directory = { fg = C.blue }, -- directory names (and other special names in listings) 15 | EndOfBuffer = { fg = O.show_end_of_buffer and C.surface1 or C.base }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. 16 | ErrorMsg = { fg = C.red, style = { "bold", "italic" } }, -- error messages on the command line 17 | VertSplit = { fg = O.transparent_background and C.surface1 or C.crust }, -- the column separating vertically split windows 18 | Folded = { fg = C.blue, bg = O.transparent_background and C.none or C.surface1 }, -- line used for closed folds 19 | FoldColumn = { fg = C.overlay0 }, -- 'foldcolumn' 20 | SignColumn = { fg = C.surface1 }, -- column where |signs| are displayed 21 | SignColumnSB = { bg = C.crust, fg = C.surface1 }, -- column where |signs| are displayed 22 | Substitute = { bg = C.surface1, fg = U.vary_color({ latte = C.red }, C.pink) }, -- |:substitute| replacement text highlighting 23 | LineNr = { fg = C.surface1 }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. 24 | CursorLineNr = { fg = C.lavender }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. highlights the number in numberline. 25 | MatchParen = { fg = C.peach, bg = C.surface1, style = { "bold" } }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| 26 | ModeMsg = { fg = C.text, style = { "bold" } }, -- 'showmode' message (e.g., "-- INSERT -- ") 27 | -- MsgArea = { fg = C.text }, -- Area for messages and cmdline, don't set this highlight because of https://github.com/neovim/neovim/issues/17832 28 | MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display' 29 | MoreMsg = { fg = C.blue }, -- |more-prompt| 30 | NonText = { fg = C.overlay0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. 31 | Normal = { fg = C.text, bg = O.transparent_background and C.none or C.base }, -- normal text 32 | NormalNC = { 33 | fg = C.text, 34 | bg = (O.transparent_background and O.dim_inactive.enabled and C.dim) 35 | or (O.dim_inactive.enabled and C.dim) 36 | or (O.transparent_background and C.none) 37 | or C.base, 38 | }, -- normal text in non-current windows 39 | NormalSB = { fg = C.text, bg = C.crust }, -- normal text in non-current windows 40 | NormalFloat = { fg = C.text, bg = (O.transparent_background and vim.o.winblend == 0) and C.none or C.mantle }, -- Normal text in floating windows. 41 | FloatBorder = { fg = C.blue }, 42 | FloatTitle = { fg = C.subtext0 }, -- Title of floating windows 43 | Pmenu = { 44 | bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or U.darken(C.surface0, 0.8, C.crust), 45 | fg = C.overlay2, 46 | }, -- Popup menu: normal item. 47 | PmenuSel = { bg = C.surface1, style = { "bold" } }, -- Popup menu: selected item. 48 | PmenuSbar = { bg = C.surface1 }, -- Popup menu: scrollbar. 49 | PmenuThumb = { bg = C.overlay0 }, -- Popup menu: Thumb of the scrollbar. 50 | PmenuExtra = { fg = C.overlay0 }, -- Popup menu: normal item extra text. 51 | PmenuExtraSel = { fg = C.overlay0 }, -- Popup menu: selected item extra text. 52 | Question = { fg = C.blue }, -- |hit-enter| prompt and yes/no questions 53 | QuickFixLine = { bg = C.surface1, style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. 54 | Search = { bg = U.darken(C.sky, 0.30, C.base), fg = C.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. 55 | IncSearch = { bg = U.darken(C.sky, 0.90, C.base), fg = C.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" 56 | CurSearch = { bg = C.red, fg = C.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently 57 | SpecialKey = { link = "NonText" }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace| 58 | SpellBad = { sp = C.red, style = { "undercurl" } }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. 59 | SpellCap = { sp = C.yellow, style = { "undercurl" } }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. 60 | SpellLocal = { sp = C.blue, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. 61 | SpellRare = { sp = C.green, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. 62 | StatusLine = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, -- status line of current window 63 | StatusLineNC = { fg = C.surface1, bg = O.transparent_background and C.none or C.mantle }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. 64 | TabLine = { bg = C.crust, fg = C.overlay0 }, -- tab pages line, not active tab page label 65 | TabLineFill = { bg = O.transparent_background and C.none or C.mantle }, -- tab pages line, where there are no labels 66 | TabLineSel = { link = "Normal" }, -- tab pages line, active tab page label 67 | TermCursor = { fg = C.base, bg = C.rosewater }, -- cursor in a focused terminal 68 | TermCursorNC = { fg = C.base, bg = C.overlay2 }, -- cursor in unfocused terminals 69 | Title = { fg = C.blue, style = { "bold" } }, -- titles for output from ":set all", ":autocmd" etc. 70 | Visual = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection 71 | VisualNOS = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection when vim is "Not Owning the Selection". 72 | WarningMsg = { fg = C.yellow }, -- warning messages 73 | Whitespace = { fg = C.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars' 74 | WildMenu = { bg = C.overlay0 }, -- current match in 'wildmenu' completion 75 | WinBar = { fg = C.rosewater }, 76 | WinBarNC = { link = "WinBar" }, 77 | WinSeparator = { fg = O.transparent_background and C.surface1 or C.crust }, 78 | } 79 | end 80 | 81 | return M 82 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/aerial.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | AerialLine = { fg = C.yellow, bg = C.none }, 6 | AerialGuide = { fg = C.overlay2 }, 7 | AerialBooleanIcon = { link = "@boolean" }, 8 | AerialClassIcon = { link = "@type" }, 9 | AerialConstantIcon = { link = "@constant" }, 10 | AerialConstructorIcon = { link = "@constructor" }, 11 | AerialFieldIcon = { link = "@field" }, 12 | AerialFunctionIcon = { link = "@function" }, 13 | AerialMethodIcon = { link = "@method" }, 14 | AerialNamespaceIcon = { link = "@namespace" }, 15 | AerialNumberIcon = { link = "@number" }, 16 | AerialOperatorIcon = { link = "@operator" }, 17 | AerialTypeParameterIcon = { link = "@type" }, 18 | AerialPropertyIcon = { link = "@property" }, 19 | AerialStringIcon = { link = "@string" }, 20 | AerialVariableIcon = { link = "@constant" }, 21 | AerialEnumMemberIcon = { link = "@field" }, 22 | AerialEnumIcon = { link = "@type" }, 23 | AerialFileIcon = { link = "@text.uri" }, 24 | AerialModuleIcon = { link = "@namespace" }, 25 | AerialPackageIcon = { link = "@namespace" }, 26 | AerialInterfaceIcon = { link = "@type" }, 27 | AerialStructIcon = { link = "@type" }, 28 | AerialEventIcon = { link = "@type" }, 29 | AerialArrayIcon = { link = "@constant" }, 30 | AerialObjectIcon = { link = "@type" }, 31 | AerialKeyIcon = { link = "@type" }, 32 | AerialNullIcon = { link = "@type" }, 33 | } 34 | end 35 | 36 | return M 37 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/alpha.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | AlphaShortcut = { fg = C.green }, 6 | AlphaHeader = { fg = C.blue }, 7 | AlphaHeaderLabel = { fg = C.peach }, 8 | AlphaButtons = { fg = C.lavender }, 9 | AlphaFooter = { fg = C.yellow, style = { "italic" } }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/avante.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local rounded = O.integrations.avante.windows_sidebar_header_rounded 5 | return { 6 | -- titles 7 | AvanteTitle = rounded and { bg = C.lavender, fg = C.base } or { fg = C.lavender }, 8 | AvanteReversedTitle = rounded and { bg = C.none, fg = C.lavender } or { fg = C.lavender }, 9 | 10 | AvanteSubtitle = rounded and { bg = C.peach, fg = C.base } or { fg = C.peach }, 11 | AvanteReversedSubtitle = rounded and { bg = C.none, fg = C.peach } or { fg = C.peach }, 12 | 13 | AvanteThirdTitle = rounded and { bg = C.blue, fg = C.base } or { fg = C.blue }, 14 | AvanteReversedThirdTitle = rounded and { bg = C.none, fg = C.blue } or { fg = C.blue }, 15 | 16 | -- hints 17 | AvanteInlineHint = { fg = C.overlay0 }, 18 | AvantePopupHint = { fg = C.overlay0 }, 19 | AvanteAnnotation = { fg = C.overlay0 }, 20 | AvanteSuggestion = { fg = C.overlay0 }, 21 | 22 | -- conflicts 23 | AvanteConflictCurrent = { 24 | bg = O.transparent_background and C.none or C.mantle, 25 | fg = C.green, 26 | }, 27 | AvanteConflictCurrentLabel = { 28 | bg = O.transparent_background and C.none or C.mantle, 29 | fg = C.green, 30 | }, 31 | 32 | AvanteConflictIncoming = { 33 | bg = O.transparent_background and C.none or C.mantle, 34 | fg = C.blue, 35 | }, 36 | AvanteConflictIncomingLabel = { 37 | bg = O.transparent_background and C.none or C.mantle, 38 | fg = C.blue, 39 | }, 40 | 41 | AvanteConflictAncestor = { 42 | bg = O.transparent_background and C.none or C.mantle, 43 | fg = C.teal, 44 | }, 45 | AvanteConflictAncestorLabel = { 46 | bg = O.transparent_background and C.none or C.mantle, 47 | fg = C.teal, 48 | }, 49 | 50 | AvanteToBeDeleted = { 51 | bg = O.transparent_background and C.none or C.mantle, 52 | fg = C.red, 53 | }, 54 | 55 | AvanteSidebarWinSeparator = { 56 | link = "WinSeparator", 57 | }, 58 | 59 | AvantePromptInput = { 60 | link = "FloatNormal", 61 | }, 62 | 63 | AvantePromptInputBorder = { 64 | link = "FloatBorder", 65 | }, 66 | } 67 | end 68 | 69 | return M 70 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/barbar.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | BufferCurrent = { bg = C.surface1, fg = C.text }, 6 | BufferCurrentIndex = { bg = C.surface1, fg = C.blue }, 7 | BufferCurrentMod = { bg = C.surface1, fg = C.yellow }, 8 | BufferCurrentSign = { bg = C.surface1, fg = C.blue }, 9 | BufferCurrentTarget = { bg = C.surface1, fg = C.red }, 10 | BufferVisible = { bg = C.mantle, fg = C.text }, 11 | BufferVisibleIndex = { bg = C.mantle, fg = C.blue }, 12 | BufferVisibleMod = { bg = C.mantle, fg = C.yellow }, 13 | BufferVisibleSign = { bg = C.mantle, fg = C.blue }, 14 | BufferVisibleTarget = { bg = C.mantle, fg = C.red }, 15 | BufferInactive = { bg = C.mantle, fg = C.overlay0 }, 16 | BufferInactiveIndex = { bg = C.mantle, fg = C.overlay0 }, 17 | BufferInactiveMod = { bg = C.mantle, fg = C.yellow }, 18 | BufferInactiveSign = { bg = C.mantle, fg = C.blue }, 19 | BufferInactiveTarget = { bg = C.mantle, fg = C.red }, 20 | BufferTabpages = { bg = C.mantle, fg = C.none }, 21 | BufferTabpage = { bg = C.mantle, fg = C.blue }, 22 | } 23 | end 24 | 25 | return M 26 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/beacon.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | Beacon = { bg = C.blue }, 6 | } 7 | end 8 | 9 | return M 10 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/blink_cmp.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | BlinkCmpLabel = { fg = C.overlay2 }, 6 | BlinkCmpLabelDeprecated = { fg = C.overlay0, style = { "strikethrough" } }, 7 | BlinkCmpKind = { fg = C.blue }, 8 | BlinkCmpMenu = { link = "Pmenu" }, 9 | BlinkCmpMenuBorder = { fg = C.blue }, 10 | BlinkCmpLabelMatch = { fg = C.text, style = { "bold" } }, 11 | BlinkCmpMenuSelection = { bg = C.surface1, style = { "bold" } }, 12 | BlinkCmpScrollBarGutter = { bg = C.surface1 }, 13 | BlinkCmpScrollBarThumb = { bg = C.overlay0 }, 14 | BlinkCmpLabelDescription = { fg = C.overlay0 }, 15 | BlinkCmpLabelDetail = { fg = C.overlay0 }, 16 | 17 | BlinkCmpKindText = { fg = C.green }, 18 | BlinkCmpKindMethod = { fg = C.blue }, 19 | BlinkCmpKindFunction = { fg = C.blue }, 20 | BlinkCmpKindConstructor = { fg = C.blue }, 21 | BlinkCmpKindField = { fg = C.green }, 22 | BlinkCmpKindVariable = { fg = C.flamingo }, 23 | BlinkCmpKindClass = { fg = C.yellow }, 24 | BlinkCmpKindInterface = { fg = C.yellow }, 25 | BlinkCmpKindModule = { fg = C.blue }, 26 | BlinkCmpKindProperty = { fg = C.blue }, 27 | BlinkCmpKindUnit = { fg = C.green }, 28 | BlinkCmpKindValue = { fg = C.peach }, 29 | BlinkCmpKindEnum = { fg = C.yellow }, 30 | BlinkCmpKindKeyword = { fg = C.mauve }, 31 | BlinkCmpKindSnippet = { fg = C.flamingo }, 32 | BlinkCmpKindColor = { fg = C.red }, 33 | BlinkCmpKindFile = { fg = C.blue }, 34 | BlinkCmpKindReference = { fg = C.red }, 35 | BlinkCmpKindFolder = { fg = C.blue }, 36 | BlinkCmpKindEnumMember = { fg = C.teal }, 37 | BlinkCmpKindConstant = { fg = C.peach }, 38 | BlinkCmpKindStruct = { fg = C.blue }, 39 | BlinkCmpKindEvent = { fg = C.blue }, 40 | BlinkCmpKindOperator = { fg = C.sky }, 41 | BlinkCmpKindTypeParameter = { fg = C.maroon }, 42 | BlinkCmpKindCopilot = { fg = C.teal }, 43 | } 44 | end 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/bufferline.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | local ctp = require "catppuccin" 3 | local O = ctp.options 4 | 5 | function M.get(user_config) 6 | user_config = user_config or {} 7 | -- Backward compatibility 8 | if O.integrations.bufferline then return {} end 9 | return function() 10 | local C = require("catppuccin.palettes").get_palette() 11 | local transparent_background = O.transparent_background 12 | local bg_highlight = (transparent_background and O.dim_inactive.enabled and C.dim) 13 | or (transparent_background and "NONE") 14 | or (O.dim_inactive.enabled and C.dim) 15 | or C.crust 16 | 17 | local active_bg = transparent_background and "NONE" or C.base 18 | local inactive_bg = transparent_background and "NONE" or C.mantle 19 | 20 | local separator_fg = O.transparent_background and C.surface1 or C.crust 21 | 22 | local styles = user_config.styles or { "bold", "italic" } 23 | 24 | local highlights = { 25 | -- buffers 26 | background = { bg = inactive_bg }, 27 | buffer_visible = { fg = C.surface1, bg = inactive_bg }, 28 | buffer_selected = { fg = C.text, bg = active_bg, style = styles }, -- current 29 | -- Duplicate 30 | duplicate_selected = { fg = C.text, bg = active_bg, style = styles }, 31 | duplicate_visible = { fg = C.surface1, bg = inactive_bg, style = styles }, 32 | duplicate = { fg = C.surface1, bg = inactive_bg, style = styles }, 33 | -- tabs 34 | tab = { fg = C.surface1, bg = inactive_bg }, 35 | tab_selected = { fg = C.sky, bg = active_bg, bold = true }, 36 | tab_separator = { fg = separator_fg, bg = inactive_bg }, 37 | tab_separator_selected = { fg = separator_fg, bg = active_bg }, 38 | 39 | tab_close = { fg = C.red, bg = inactive_bg }, 40 | indicator_visible = { fg = C.peach, bg = inactive_bg, style = styles }, 41 | indicator_selected = { fg = C.peach, bg = active_bg, style = styles }, 42 | -- separators 43 | separator = { fg = separator_fg, bg = inactive_bg }, 44 | separator_visible = { fg = separator_fg, bg = inactive_bg }, 45 | separator_selected = { fg = separator_fg, bg = active_bg }, 46 | offset_separator = { fg = separator_fg, bg = active_bg }, 47 | -- close buttons 48 | close_button = { fg = C.surface1, bg = inactive_bg }, 49 | close_button_visible = { fg = C.surface1, bg = inactive_bg }, 50 | close_button_selected = { fg = C.red, bg = active_bg }, 51 | -- Empty fill 52 | fill = { bg = bg_highlight }, 53 | -- Numbers 54 | numbers = { fg = C.subtext0, bg = inactive_bg }, 55 | numbers_visible = { fg = C.subtext0, bg = inactive_bg }, 56 | numbers_selected = { fg = C.subtext0, bg = active_bg, style = styles }, 57 | -- Errors 58 | error = { fg = C.red, bg = inactive_bg }, 59 | error_visible = { fg = C.red, bg = inactive_bg }, 60 | error_selected = { fg = C.red, bg = active_bg, style = styles }, 61 | error_diagnostic = { fg = C.red, bg = inactive_bg }, 62 | error_diagnostic_visible = { fg = C.red, bg = inactive_bg }, 63 | error_diagnostic_selected = { fg = C.red, bg = active_bg }, 64 | -- Warnings 65 | warning = { fg = C.yellow, bg = inactive_bg }, 66 | warning_visible = { fg = C.yellow, bg = inactive_bg }, 67 | warning_selected = { fg = C.yellow, bg = active_bg, style = styles }, 68 | warning_diagnostic = { fg = C.yellow, bg = inactive_bg }, 69 | warning_diagnostic_visible = { fg = C.yellow, bg = inactive_bg }, 70 | warning_diagnostic_selected = { fg = C.yellow, bg = active_bg }, 71 | -- Infos 72 | info = { fg = C.sky, bg = inactive_bg }, 73 | info_visible = { fg = C.sky, bg = inactive_bg }, 74 | info_selected = { fg = C.sky, bg = active_bg, style = styles }, 75 | info_diagnostic = { fg = C.sky, bg = inactive_bg }, 76 | info_diagnostic_visible = { fg = C.sky, bg = inactive_bg }, 77 | info_diagnostic_selected = { fg = C.sky, bg = active_bg }, 78 | -- Hint 79 | hint = { fg = C.teal, bg = inactive_bg }, 80 | hint_visible = { fg = C.teal, bg = inactive_bg }, 81 | hint_selected = { fg = C.teal, bg = active_bg, style = styles }, 82 | hint_diagnostic = { fg = C.teal, bg = inactive_bg }, 83 | hint_diagnostic_visible = { fg = C.teal, bg = inactive_bg }, 84 | hint_diagnostic_selected = { fg = C.teal, bg = active_bg }, 85 | -- Diagnostics 86 | diagnostic = { fg = C.subtext0, bg = inactive_bg }, 87 | diagnostic_visible = { fg = C.subtext0, bg = inactive_bg }, 88 | diagnostic_selected = { fg = C.subtext0, bg = active_bg, style = styles }, 89 | -- Modified 90 | modified = { fg = C.peach, bg = inactive_bg }, 91 | modified_visible = { fg = C.peach, bg = inactive_bg }, 92 | modified_selected = { fg = C.peach, bg = active_bg }, 93 | } 94 | 95 | local user_highlights = user_config.custom or {} 96 | highlights = 97 | vim.tbl_deep_extend("keep", user_highlights[ctp.flavour] or {}, user_highlights.all or {}, highlights) 98 | 99 | for _, color in pairs(highlights) do 100 | -- Because default is gui=bold,italic 101 | color.italic = false 102 | color.bold = false 103 | 104 | if color.style then 105 | for _, style in pairs(color.style) do 106 | color[style] = true 107 | if O.no_italic and style == "italic" then color[style] = false end 108 | if O.no_bold and style == "bold" then color[style] = false end 109 | if O.no_underline and style == "underline" then color[style] = false end 110 | end 111 | end 112 | color.style = nil 113 | end 114 | 115 | return highlights 116 | end 117 | end 118 | 119 | return M 120 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/cmp.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | CmpItemAbbr = { fg = C.overlay2 }, 6 | CmpItemAbbrDeprecated = { fg = C.overlay0, style = { "strikethrough" } }, 7 | CmpItemKind = { fg = C.blue }, 8 | CmpItemMenu = { fg = C.text }, 9 | CmpItemAbbrMatch = { fg = C.text, style = { "bold" } }, 10 | CmpItemAbbrMatchFuzzy = { fg = C.text, style = { "bold" } }, 11 | 12 | -- kind support 13 | CmpItemKindSnippet = { fg = C.mauve }, 14 | CmpItemKindKeyword = { fg = C.red }, 15 | CmpItemKindText = { fg = C.teal }, 16 | CmpItemKindMethod = { fg = C.blue }, 17 | CmpItemKindConstructor = { fg = C.blue }, 18 | CmpItemKindFunction = { fg = C.blue }, 19 | CmpItemKindFolder = { fg = C.blue }, 20 | CmpItemKindModule = { fg = C.blue }, 21 | CmpItemKindConstant = { fg = C.peach }, 22 | CmpItemKindField = { fg = C.green }, 23 | CmpItemKindProperty = { fg = C.green }, 24 | CmpItemKindEnum = { fg = C.green }, 25 | CmpItemKindUnit = { fg = C.green }, 26 | CmpItemKindClass = { fg = C.yellow }, 27 | CmpItemKindVariable = { fg = C.flamingo }, 28 | CmpItemKindFile = { fg = C.blue }, 29 | CmpItemKindInterface = { fg = C.yellow }, 30 | CmpItemKindColor = { fg = C.red }, 31 | CmpItemKindReference = { fg = C.red }, 32 | CmpItemKindEnumMember = { fg = C.red }, 33 | CmpItemKindStruct = { fg = C.blue }, 34 | CmpItemKindValue = { fg = C.peach }, 35 | CmpItemKindEvent = { fg = C.blue }, 36 | CmpItemKindOperator = { fg = C.blue }, 37 | CmpItemKindTypeParameter = { fg = C.blue }, 38 | CmpItemKindCopilot = { fg = C.teal }, 39 | } 40 | end 41 | 42 | return M 43 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/coc_nvim.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | -- These groups are for the coc.nvim, see ":h coc-highlights" 6 | -- Custom popup menu since coc v0.0.82 7 | CocMenuSel = { link = "PmenuSel" }, 8 | CocPumSearch = { fg = C.sky, style = { "bold" } }, 9 | 10 | -- Inlay hints 11 | CocInlayHint = { 12 | -- fg of `Comment` 13 | fg = C.overlay0, 14 | style = { "italic" }, 15 | }, 16 | } 17 | end 18 | 19 | return M 20 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/colorful_winsep.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NvimSeparator = { 6 | fg = C[O.integrations.colorful_winsep.color], 7 | bg = O.transparent_background and C.none or C.base, 8 | }, 9 | } 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/copilot_vim.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | CopilotSuggestion = { fg = C.overlay0 }, 6 | CopilotAnnotation = { fg = C.blue }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/dadbod_ui.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NotificationInfo = { fg = C.blue, bg = C.mantle }, 6 | NotificationWarning = { fg = C.yellow, bg = C.mantle }, 7 | NotificationError = { fg = C.red, bg = C.mantle }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/dap.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | DapBreakpoint = { fg = C.red }, 6 | DapBreakpointCondition = { fg = C.yellow }, 7 | DapBreakpointRejected = { fg = C.mauve }, 8 | DapLogPoint = { fg = C.sky }, 9 | DapStopped = { fg = C.maroon }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/dap_ui.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | DapUIScope = { fg = C.sky }, 6 | DapUIType = { fg = C.mauve }, 7 | DapUIValue = { fg = C.sky }, 8 | DapUIVariable = { fg = C.text }, 9 | DapUIModifiedValue = { fg = C.peach }, 10 | DapUIDecoration = { fg = C.sky }, 11 | DapUIThread = { fg = C.green }, 12 | DapUIStoppedThread = { fg = C.sky }, 13 | DapUISource = { fg = C.lavender }, 14 | DapUILineNumber = { fg = C.sky }, 15 | DapUIFloatBorder = { link = "FloatBorder" }, 16 | 17 | DapUIWatchesEmpty = { fg = C.maroon }, 18 | DapUIWatchesValue = { fg = C.green }, 19 | DapUIWatchesError = { fg = C.maroon }, 20 | 21 | DapUIBreakpointsPath = { fg = C.sky }, 22 | DapUIBreakpointsInfo = { fg = C.green }, 23 | DapUIBreakpointsCurrentLine = { fg = C.green, style = { "bold" } }, 24 | DapUIBreakpointsDisabledLine = { fg = C.surface2 }, 25 | 26 | DapUIStepOver = { fg = C.blue }, 27 | DapUIStepOverNC = { link = "DapUIStepOver" }, 28 | DapUIStepInto = { fg = C.blue }, 29 | DapUIStepIntoNC = { link = "DapUIStepInto" }, 30 | DapUIStepBack = { fg = C.blue }, 31 | DapUIStepBackNC = { link = "DapUIStepBack" }, 32 | DapUIStepOut = { fg = C.blue }, 33 | DapUIStepOutNC = { link = "DapUIStepOut" }, 34 | DapUIStop = { fg = C.red }, 35 | DapUIStopNC = { link = "DapUIStop" }, 36 | DapUIPlayPause = { fg = C.green }, 37 | DapUIPlayPauseNC = { link = "DapUIPlayPause" }, 38 | DapUIRestart = { fg = C.green }, 39 | DapUIRestartNC = { link = "DapUIRestart" }, 40 | DapUIUnavailable = { fg = C.surface1 }, 41 | DapUIUnavailableNC = { link = "DapUIUnavailable" }, 42 | 43 | DapUIWinSelect = { fg = C.peach }, 44 | } 45 | end 46 | 47 | return M 48 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/dashboard.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | DashboardShortCut = { fg = C.pink }, 6 | DashboardHeader = { fg = C.blue }, 7 | DashboardCenter = { fg = C.green }, 8 | DashboardFooter = { fg = C.yellow, style = { "italic" } }, 9 | DashboardMruTitle = { fg = C.sky }, 10 | DashboardProjectTitle = { fg = C.sky }, 11 | DashboardFiles = { fg = C.lavender }, 12 | DashboardKey = { fg = C.peach }, 13 | DashboardDesc = { fg = C.blue }, 14 | DashboardIcon = { fg = C.pink, bold = true }, 15 | } 16 | end 17 | 18 | return M 19 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/diffview.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | DiffviewDim1 = { link = "Comment" }, 6 | DiffviewPrimary = { fg = C.blue }, 7 | DiffviewSecondary = { fg = C.green }, 8 | DiffviewNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, 9 | DiffviewWinSeparator = { 10 | fg = O.transparent_background and C.surface1 or C.base, 11 | bg = O.transparent_background and C.none or C.base, 12 | }, 13 | DiffviewFilePanelTitle = { fg = C.blue, style = { "bold" } }, 14 | DiffviewFilePanelCounter = { fg = C.text }, 15 | DiffviewFilePanelRootPath = { fg = C.lavender, style = { "bold" } }, 16 | DiffviewFilePanelFileName = { fg = C.text }, 17 | DiffviewFilePanelSelected = { fg = C.yellow }, 18 | DiffviewFilePanelPath = { link = "Comment" }, 19 | DiffviewFilePanelInsertions = { fg = C.green }, 20 | DiffviewFilePanelDeletions = { fg = C.red }, 21 | DiffviewFilePanelConflicts = { fg = C.yellow }, 22 | DiffviewFolderName = { fg = C.blue, style = { "bold" } }, 23 | DiffviewFolderSign = { fg = C.blue }, 24 | DiffviewHash = { fg = C.flamingo }, 25 | DiffviewReference = { fg = C.blue, style = { "bold" } }, 26 | DiffviewReflogSelector = { fg = C.pink }, 27 | DiffviewStatusAdded = { fg = C.green }, 28 | DiffviewStatusUntracked = { fg = C.green }, 29 | DiffviewStatusModified = { fg = C.yellow }, 30 | DiffviewStatusRenamed = { fg = C.yellow }, 31 | DiffviewStatusCopied = { fg = C.yellow }, 32 | DiffviewStatusTypeChange = { fg = C.yellow }, 33 | DiffviewStatusUnmerged = { fg = C.yellow }, 34 | DiffviewStatusUnknown = { fg = C.red }, 35 | DiffviewStatusDeleted = { fg = C.red }, 36 | DiffviewStatusBroken = { fg = C.red }, 37 | DiffviewStatusIgnored = { fg = C.overlay0 }, 38 | } 39 | end 40 | 41 | return M 42 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/dropbar.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local color = O.integrations.dropbar.color_mode 5 | return { 6 | DropBarMenuHoverEntry = { link = "Visual" }, 7 | DropBarMenuHoverIcon = { reverse = true }, 8 | DropBarMenuHoverSymbol = { bold = true }, 9 | DropBarIconUISeparator = { fg = C.overlay1 }, 10 | DropBarKindArray = color and { link = "DropBarIconKindArray" } or { fg = C.text }, 11 | DropBarKindBoolean = color and { link = "DropBarIconKindBoolean" } or { fg = C.text }, 12 | DropBarKindBreakStatement = color and { link = "DropBarIconKindBreakStatement" } or { fg = C.text }, 13 | DropBarKindCall = color and { link = "DropBarIconKindCall" } or { fg = C.text }, 14 | DropBarKindCaseStatement = color and { link = "DropBarIconKindCaseStatement" } or { fg = C.text }, 15 | DropBarKindClass = color and { link = "DropBarIconKindClass" } or { fg = C.text }, 16 | DropBarKindConstant = color and { link = "DropBarIconKindConstant" } or { fg = C.text }, 17 | DropBarKindConstructor = color and { link = "DropBarIconKindConstructor" } or { fg = C.text }, 18 | DropBarKindContinueStatement = color and { link = "DropBarIconKindContinueStatement" } or { fg = C.text }, 19 | DropBarKindDeclaration = color and { link = "DropBarIconKindDeclaration" } or { fg = C.text }, 20 | DropBarKindDelete = color and { link = "DropBarIconKindDelete" } or { fg = C.text }, 21 | DropBarKindDoStatement = color and { link = "DropBarIconKindDoStatement" } or { fg = C.text }, 22 | DropBarKindElseStatement = color and { link = "DropBarIconKindElseStatement" } or { fg = C.text }, 23 | DropBarKindEnum = color and { link = "DropBarIconKindEnum" } or { fg = C.text }, 24 | DropBarKindEnumMember = color and { link = "DropBarIconKindEnumMember" } or { fg = C.text }, 25 | DropBarKindEvent = color and { link = "DropBarIconKindEvent" } or { fg = C.text }, 26 | DropBarKindField = color and { link = "DropBarIconKindField" } or { fg = C.text }, 27 | DropBarKindFile = color and { link = "DropBarIconKindFile" } or { fg = C.text }, 28 | DropBarKindFolder = color and { link = "DropBarIconKindFolder" } or { fg = C.text }, 29 | DropBarKindForStatement = color and { link = "DropBarIconKindForStatement" } or { fg = C.text }, 30 | DropBarKindFunction = color and { link = "DropBarIconKindFunction" } or { fg = C.text }, 31 | DropBarKindIdentifier = color and { link = "DropBarIconKindIdentifier" } or { fg = C.text }, 32 | DropBarKindIfStatement = color and { link = "DropBarIconKindIfStatement" } or { fg = C.text }, 33 | DropBarKindInterface = color and { link = "DropBarIconKindInterface" } or { fg = C.text }, 34 | DropBarKindKeyword = color and { link = "DropBarIconKindKeyword" } or { fg = C.text }, 35 | DropBarKindList = color and { link = "DropBarIconKindList" } or { fg = C.text }, 36 | DropBarKindMacro = color and { link = "DropBarIconKindMacro" } or { fg = C.text }, 37 | DropBarKindMarkdownH1 = color and { link = "DropBarIconKindMarkdownH1" } or { fg = C.text }, 38 | DropBarKindMarkdownH2 = color and { link = "DropBarIconKindMarkdownH2" } or { fg = C.text }, 39 | DropBarKindMarkdownH3 = color and { link = "DropBarIconKindMarkdownH3" } or { fg = C.text }, 40 | DropBarKindMarkdownH4 = color and { link = "DropBarIconKindMarkdownH4" } or { fg = C.text }, 41 | DropBarKindMarkdownH5 = color and { link = "DropBarIconKindMarkdownH5" } or { fg = C.text }, 42 | DropBarKindMarkdownH6 = color and { link = "DropBarIconKindMarkdownH6" } or { fg = C.text }, 43 | DropBarKindMethod = color and { link = "DropBarIconKindMethod" } or { fg = C.text }, 44 | DropBarKindModule = color and { link = "DropBarIconKindModule" } or { fg = C.text }, 45 | DropBarKindNamespace = color and { link = "DropBarIconKindNamespace" } or { fg = C.text }, 46 | DropBarKindNull = color and { link = "DropBarIconKindNull" } or { fg = C.text }, 47 | DropBarKindNumber = color and { link = "DropBarIconKindNumber" } or { fg = C.text }, 48 | DropBarKindObject = color and { link = "DropBarIconKindObject" } or { fg = C.text }, 49 | DropBarKindOperator = color and { link = "DropBarIconKindOperator" } or { fg = C.text }, 50 | DropBarKindPackage = color and { link = "DropBarIconKindPackage" } or { fg = C.text }, 51 | DropBarKindProperty = color and { link = "DropBarIconKindProperty" } or { fg = C.text }, 52 | DropBarKindReference = color and { link = "DropBarIconKindReference" } or { fg = C.text }, 53 | DropBarKindRepeat = color and { link = "DropBarIconKindRepeat" } or { fg = C.text }, 54 | DropBarKindScope = color and { link = "DropBarIconKindScope" } or { fg = C.text }, 55 | DropBarKindSpecifier = color and { link = "DropBarIconKindSpecifier" } or { fg = C.text }, 56 | DropBarKindStatement = color and { link = "DropBarIconKindStatement" } or { fg = C.text }, 57 | DropBarKindString = color and { link = "DropBarIconKindString" } or { fg = C.text }, 58 | DropBarKindStruct = color and { link = "DropBarIconKindStruct" } or { fg = C.text }, 59 | DropBarKindSwitchStatement = color and { link = "DropBarIconKindSwitchStatement" } or { fg = C.text }, 60 | DropBarKindType = color and { link = "DropBarIconKindType" } or { fg = C.text }, 61 | DropBarKindTypeParameter = color and { link = "DropBarIconKindTypeParameter" } or { fg = C.text }, 62 | DropBarKindUnit = color and { link = "DropBarIconKindUnit" } or { fg = C.text }, 63 | DropBarKindValue = color and { link = "DropBarIconKindValue" } or { fg = C.text }, 64 | DropBarKindVariable = color and { link = "DropBarIconKindVariable" } or { fg = C.text }, 65 | DropBarKindWhileStatement = color and { link = "DropBarIconKindWhileStatement" } or { fg = C.text }, 66 | } 67 | end 68 | 69 | return M 70 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/fern.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | FernBranchText = { fg = C.blue }, 6 | } 7 | end 8 | 9 | return M 10 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/fidget.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | FidgetTask = { 6 | bg = O.transparent_background and C.none or C.mantle, 7 | fg = C.text, 8 | }, 9 | FidgetTitle = { fg = C.blue }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/flash.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local bg = O.transparent_background and C.none or C.base 5 | return { 6 | FlashBackdrop = { fg = C.overlay0 }, 7 | FlashLabel = { fg = C.green, bg = bg, style = { "bold" } }, 8 | FlashMatch = { fg = C.lavender, bg = bg }, 9 | FlashCurrent = { fg = C.peach, bg = bg }, 10 | FlashPrompt = { link = "NormalFloat" }, 11 | } 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/fzf.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | -- FzfLuaNormal = { link = "NormalFloat" }, Respect fzf-lua's default float bg 6 | FzfLuaBorder = { link = "FloatBorder" }, 7 | FzfLuaTitle = { link = "FloatBorder" }, 8 | FzfLuaHeaderBind = { fg = C.yellow }, 9 | FzfLuaHeaderText = { fg = C.peach }, 10 | FzfLuaDirPart = { link = "NonText" }, 11 | FzfLuaFzfMatch = { fg = C.blue }, 12 | FzfLuaFzfPrompt = { fg = C.blue }, 13 | FzfLuaPathColNr = { fg = C.blue }, 14 | FzfLuaPathLineNr = { fg = C.green }, 15 | FzfLuaBufName = { fg = C.mauve }, 16 | FzfLuaBufNr = { fg = C.yellow }, 17 | FzfLuaBufFlagCur = { fg = C.peach }, 18 | FzfLuaBufFlagAlt = { fg = C.blue }, 19 | FzfLuaTabTitle = { fg = C.sky }, 20 | FzfLuaTabMarker = { fg = C.yellow }, 21 | FzfLuaLiveSym = { fg = C.peach }, 22 | } 23 | end 24 | 25 | return M 26 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/gitgraph.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | GitGraphHash = { fg = C.mauve }, 6 | GitGraphTimestamp = { fg = C.lavender }, 7 | GitGraphAuthor = { fg = C.flamingo }, 8 | GitGraphBranchName = { fg = C.teal }, 9 | GitGraphBranchTag = { fg = C.pink }, 10 | GitGraphBranchMsg = { fg = C.overlay2 }, 11 | GitGraphBranch1 = { fg = C.yellow }, 12 | GitGraphBranch2 = { fg = C.pink }, 13 | GitGraphBranch3 = { fg = C.sky }, 14 | GitGraphBranch4 = { fg = C.green }, 15 | GitGraphBranch5 = { fg = C.red }, 16 | } 17 | end 18 | 19 | return M 20 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/gitgutter.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | GitGutterAdd = { fg = C.green }, 6 | GitGutterChange = { fg = C.yellow }, 7 | GitGutterDelete = { fg = C.red }, 8 | GitGutterAddLineNr = { fg = C.green }, 9 | GitGutterChangeLineNr = { fg = C.yellow }, 10 | GitGutterDeleteLineNr = { fg = C.red }, 11 | } 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/gitsigns.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | -- (a ~= nil) and a or b: Potential false-negative handling 5 | local transparent = O.transparent_background 6 | if type(O.integrations.gitsigns.transparent) == "boolean" then transparent = O.integrations.gitsigns.transparent end 7 | 8 | if transparent then 9 | return { 10 | GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt| 11 | GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt| 12 | GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt| 13 | 14 | GitSignsCurrentLineBlame = { fg = C.surface1 }, 15 | 16 | GitSignsAddPreview = { fg = C.green, bg = C.none }, 17 | GitSignsDeletePreview = { fg = C.red, bg = C.none }, 18 | 19 | -- for word diff in previews 20 | GitSignsAddInline = { fg = C.base, bg = C.green, style = { "bold" } }, 21 | GitSignsDeleteInline = { fg = C.base, bg = C.red, style = { "bold" } }, 22 | GitSignsChangeInline = { fg = C.base, bg = C.blue, style = { "bold" } }, 23 | 24 | GitSignsDeleteVirtLn = { bg = C.none, fg = C.red }, 25 | } 26 | else 27 | return { 28 | GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt| 29 | GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt| 30 | GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt| 31 | 32 | GitSignsCurrentLineBlame = { fg = C.surface1 }, 33 | 34 | GitSignsAddPreview = { link = "DiffAdd" }, 35 | GitSignsDeletePreview = { link = "DiffDelete" }, 36 | 37 | GitSignsAddInline = { bg = U.darken(C.green, 0.36, C.base) }, 38 | GitSignsChangeInline = { bg = U.darken(C.blue, 0.14, C.base) }, 39 | GitSignsDeleteInline = { bg = U.darken(C.red, 0.36, C.base) }, 40 | } 41 | end 42 | end 43 | 44 | return M 45 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/grug_far.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | GrugFarResultsMatch = { link = "IncSearch" }, 6 | } 7 | end 8 | 9 | return M 10 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/harpoon.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | HarpoonWindow = { fg = C.text, bg = O.transparent_background and C.none or C.base }, 6 | HarpoonBorder = { fg = C.blue }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/headlines.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | Dash = { fg = C.overlay2, style = { "bold" } }, 6 | Quote = { link = "@markup.strong" }, 7 | CodeBlock = { bg = C.mantle }, 8 | Headline = { link = "Headline1" }, 9 | Headline1 = { bg = C.surface0, fg = C.red }, 10 | Headline2 = { bg = C.surface0, fg = C.peach }, 11 | Headline3 = { bg = C.surface0, fg = C.yellow }, 12 | Headline4 = { bg = C.surface0, fg = C.green }, 13 | Headline5 = { bg = C.surface0, fg = C.sapphire }, 14 | Headline6 = { bg = C.surface0, fg = C.lavender }, 15 | } 16 | end 17 | 18 | return M 19 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/hop.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local bg = O.transparent_background and C.none or C.base 5 | return { 6 | HopNextKey = { bg = bg, fg = C.peach, style = { "bold", "underline" } }, 7 | HopNextKey1 = { bg = bg, fg = C.blue, style = { "bold" } }, 8 | HopNextKey2 = { bg = bg, fg = C.teal, style = { "bold", "italic" } }, 9 | HopUnmatched = { bg = bg, fg = C.overlay0 }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/illuminate.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | IlluminatedWordText = { bg = U.darken(C.surface1, 0.7, C.base) }, 6 | IlluminatedWordRead = { bg = U.darken(C.surface1, 0.7, C.base) }, 7 | IlluminatedWordWrite = { 8 | bg = U.darken(C.surface1, 0.7, C.base), 9 | style = O.integrations.illuminate.lsp and { "standout" } or {}, 10 | }, 11 | } 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/indent_blankline.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local scope_color = O.integrations.indent_blankline.scope_color 5 | 6 | local hi = { 7 | IblIndent = { fg = C.surface0 }, 8 | IblScope = { fg = C[scope_color] or C.text }, 9 | } 10 | 11 | if O.integrations.indent_blankline.colored_indent_levels then 12 | hi["RainbowRed"] = { blend = 0, fg = C.red } 13 | hi["RainbowYellow"] = { blend = 0, fg = C.yellow } 14 | hi["RainbowBlue"] = { blend = 0, fg = C.blue } 15 | hi["RainbowOrange"] = { blend = 0, fg = C.peach } 16 | hi["RainbowGreen"] = { blend = 0, fg = C.green } 17 | hi["RainbowViolet"] = { blend = 0, fg = C.mauve } 18 | hi["RainbowCyan"] = { blend = 0, fg = C.teal } 19 | end 20 | 21 | return hi 22 | end 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/leap.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | LeapMatch = { 6 | fg = O.transparent_background and C.pink or U.vary_color({ latte = "#222222" }, U.brighten(C.green, 0.3)), 7 | style = { "underline", "nocombine", O.transparent_background and "bold" or nil }, 8 | }, 9 | LeapLabel = { 10 | fg = O.transparent_background and C.green or U.vary_color({ latte = "#222222" }, C.base), 11 | bg = O.transparent_background and C.none 12 | or U.vary_color({ latte = U.brighten(C.red, 0.4) }, U.brighten(C.green, 0.3)), 13 | style = { "nocombine", O.transparent_background and "bold" or nil }, 14 | }, 15 | LeapBackdrop = { fg = O.transparent_background and C.overlay0 or C.none }, 16 | } 17 | end 18 | 19 | return M 20 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/lightspeed.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | LightspeedLabel = { fg = C.red, style = { "bold", "underline" } }, 6 | LightspeedLabelDistant = { 7 | fg = U.vary_color({ latte = C.blue }, C.sky), 8 | style = { "bold", "underline" }, 9 | }, 10 | LightspeedShortcut = { 11 | fg = "#ffffff", 12 | bg = U.increase_saturation(C.red, 0.7), 13 | style = { "bold" }, 14 | }, 15 | LightspeedMaskedChar = { 16 | fg = U.vary_color({ latte = U.lighten(C.pink, 0.7, C.text) }, U.darken(C.pink, 0.7, C.base)), 17 | }, 18 | LightspeedUnlabeledMatch = { fg = C.text, style = { "bold" } }, 19 | LightspeedGreyWash = { link = "Comment" }, 20 | LightspeedUniqueChar = { link = "LightspeedUnlabeledMatch" }, 21 | LightspeedOneCharMatch = { link = "LightspeedShortcut" }, 22 | LightspeedPendingOpArea = { link = "IncSearch" }, 23 | LightspeedCursor = { link = "Cursor" }, 24 | } 25 | end 26 | 27 | return M 28 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/lir.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return vim.tbl_deep_extend("force", {}, { 5 | LirFloatNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, 6 | LirFloatBorder = { 7 | fg = O.transparent_background and C.surface1 or C.base, 8 | bg = O.transparent_background and C.none or C.base, 9 | }, 10 | LirFloatCursorLine = { link = "CursorLine" }, 11 | LirDir = { fg = C.blue }, 12 | LirSymLink = { fg = C.pink }, 13 | LirEmptyDirText = { fg = C.blue }, 14 | LirFloatCurdirWindowNormal = { fg = C.text }, 15 | LirFloatCurdirWindowDirName = { fg = C.lavender, style = { "bold" } }, 16 | }, ((O.integrations.lir and O.integrations.lir.git_status) and { 17 | LirGitStatusBracket = { fg = C.overlay0 }, 18 | LirGitStatusIndex = { fg = C.blue }, 19 | LirGitStatusWorktree = { fg = C.yellow }, 20 | LirGitStatusUnmerged = { fg = C.red }, 21 | LirGitStatusUntracked = { fg = C.subtext0 }, 22 | LirGitStatusIgnored = { fg = C.subtext0 }, 23 | }) or {}) 24 | end 25 | 26 | return M 27 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/lsp_saga.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | SagaTitle = { fg = C.teal, style = { "bold" } }, 6 | SagaBorder = { fg = C.blue, bg = C.none }, 7 | SagaNormal = { bg = O.transparent_background and C.none or C.base }, 8 | SagaToggle = { fg = C.green }, 9 | SagaCount = { fg = C.overlay1 }, 10 | SagaBeacon = { bg = U.darken(C.surface0, 0.8, C.crust) }, 11 | SagaVirtLine = { fg = C.surface2 }, 12 | SagaSpinner = { fg = C.mauve, style = { "bold" } }, 13 | SagaSpinnerTitle = { fg = C.mauve, style = { "bold" } }, 14 | SagaText = { fg = C.text }, 15 | SagaSelect = { fg = C.blue, style = { "bold" } }, 16 | SagaSearch = { link = "Search" }, 17 | SagaFinderFname = { fg = C.subtext0, style = { "bold" } }, 18 | ActionFix = { fg = C.pink }, 19 | ActionPreviewTitle = { fg = C.mauve, bg = O.transparent_background and C.none or C.base }, 20 | CodeActionText = { fg = C.green }, 21 | CodeActionNumber = { fg = C.pink }, 22 | SagaImpIcon = { fg = C.pink }, 23 | SagaLightBulb = { link = "DiagnosticSignHint" }, 24 | RenameNormal = { fg = C.text }, 25 | RenameMatch = { link = "Search" }, 26 | DiagnosticText = { fg = C.text }, 27 | SagaWinbarSep = { fg = C.flamingo }, 28 | SagaDetail = { link = "Comment" }, 29 | SagaFileName = { fg = C.overlay2, style = { "bold" } }, 30 | SagaFolderName = { fg = C.overlay2, style = { "bold" } }, 31 | SagaInCurrent = { fg = C.peach }, 32 | 33 | -- Lspkind icons support 34 | LspKindClass = { fg = C.yellow }, 35 | LspKindConstant = { fg = C.peach }, 36 | LspKindConstructor = { fg = C.sapphire }, 37 | LspKindEnum = { fg = C.yellow }, 38 | LspKindEnumMember = { fg = C.teal }, 39 | LspKindEvent = { fg = C.yellow }, 40 | LspKindField = { fg = C.teal }, 41 | LspKindFile = { fg = C.rosewater }, 42 | LspKindFunction = { fg = C.blue }, 43 | LspKindInterface = { fg = C.yellow }, 44 | LspKindKey = { fg = C.red }, 45 | LspKindMethod = { fg = C.blue }, 46 | LspKindModule = { fg = C.blue }, 47 | LspKindNamespace = { fg = C.blue }, 48 | LspKindNumber = { fg = C.peach }, 49 | LspKindOperator = { fg = C.sky }, 50 | LspKindPackage = { fg = C.blue }, 51 | LspKindProperty = { fg = C.teal }, 52 | LspKindStruct = { fg = C.yellow }, 53 | LspKindTypeParameter = { fg = C.blue }, 54 | LspKindVariable = { fg = C.peach }, 55 | LspKindArray = { fg = C.peach }, 56 | LspKindBoolean = { fg = C.peach }, 57 | LspKindNull = { fg = C.yellow }, 58 | LspKindObject = { fg = C.yellow }, 59 | LspKindString = { fg = C.green }, 60 | -- ccls-specific icons. 61 | LspKindTypeAlias = { fg = C.green }, 62 | LspKindParameter = { fg = C.blue }, 63 | LspKindStaticMethod = { fg = C.peach }, 64 | -- Microsoft-specific icons. 65 | LspKindText = { fg = C.green }, 66 | LspKindSnippet = { fg = C.mauve }, 67 | LspKindFolder = { fg = C.blue }, 68 | LspKindUnit = { fg = C.green }, 69 | LspKindValue = { fg = C.peach }, 70 | } 71 | end 72 | 73 | function M.custom_kind() 74 | return { 75 | File = { "󰈙 ", "LspKindFile" }, 76 | Module = { " ", "LspKindModule" }, 77 | Namespace = { "󰌗 ", "LspKindNamespace" }, 78 | Package = { "󰏖 ", "LspKindPackage" }, 79 | Class = { "󰌗 ", "LspKindClass" }, 80 | Method = { " ", "LspKindMethod" }, 81 | Property = { "󰆧 ", "LspKindProperty" }, 82 | Field = { " ", "LspKindField" }, 83 | Constructor = { " ", "LspKindConstructor" }, 84 | Enum = { "󰒻", "LspKindEnum" }, 85 | Interface = { " ", "LspKindInterface" }, 86 | Function = { "󰊕 ", "LspKindFunction" }, 87 | Variable = { " ", "LspKindVariable" }, 88 | Constant = { " ", "LspKindConstant" }, 89 | String = { "󰀬 ", "LspKindString" }, 90 | Number = { "󰎠 ", "LspKindNumber" }, 91 | Boolean = { " ", "LspKindBoolean" }, 92 | Array = { "󰅪 ", "LspKindArray" }, 93 | Object = { "󰅩 ", "LspKindObject" }, 94 | Key = { "󰌋 ", "LspKindKey" }, 95 | Null = { " ", "LspKindNull" }, 96 | EnumMember = { " ", "LspKindEnumMember" }, 97 | Struct = { "󰌗 ", "LspKindStruct" }, 98 | Event = { " ", "LspKindEvent" }, 99 | Operator = { "󰆕 ", "LspKindOperator" }, 100 | TypeParameter = { "󰊄 ", "LspKindTypeParameter" }, 101 | TypeAlias = { " ", "LspKindTypeAlias" }, 102 | Parameter = { " ", "LspKindParameter" }, 103 | StaticMethod = { "󰠄 ", "LspKindStaticMethod" }, 104 | Macro = { " ", "LspKindMacro" }, 105 | Text = { "󰉿 ", "LspKindText" }, 106 | Snippet = { " ", "LspKindSnippet" }, 107 | Folder = { " ", "LspKindFolder" }, 108 | Unit = { "󰉻 ", "LspKindUnit" }, 109 | Value = { " ", "LspKindValue" }, 110 | } 111 | end 112 | 113 | -- Backwards compatibility 114 | function M.custom_colors() 115 | local C = require("catppuccin.palettes").get_palette() 116 | return { 117 | normal_bg = C.base, 118 | title_bg = C.green, 119 | red = C.red, 120 | magenta = C.maroon, 121 | orange = C.peach, 122 | yellow = C.yellow, 123 | green = C.green, 124 | cyan = C.sky, 125 | blue = C.blue, 126 | purple = C.mauve, 127 | white = C.text, 128 | black = C.crust, 129 | } 130 | end 131 | 132 | return M 133 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/lsp_trouble.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | TroubleText = { fg = C.green }, 6 | TroubleCount = { fg = C.pink, bg = O.transparent_background and C.none or C.surface1 }, 7 | TroubleNormal = { fg = C.text, bg = O.transparent_background and C.none or C.crust }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/markdown.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | markdownHeadingDelimiter = { fg = C.peach, style = { "bold" } }, 6 | markdownCode = { fg = C.flamingo }, 7 | markdownCodeBlock = { fg = C.flamingo }, 8 | markdownLinkText = { fg = C.blue, style = { "underline" } }, 9 | markdownH1 = { link = "rainbow1" }, 10 | markdownH2 = { link = "rainbow2" }, 11 | markdownH3 = { link = "rainbow3" }, 12 | markdownH4 = { link = "rainbow4" }, 13 | markdownH5 = { link = "rainbow5" }, 14 | markdownH6 = { link = "rainbow6" }, 15 | } 16 | end 17 | 18 | return M 19 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/markview.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | -- markview.nvim highlight groups: 4 | -- https://github.com/OXY2DEV/markview.nvim#-highlight-groups 5 | 6 | function M.get() 7 | local darkening_percentage = O.transparent_background and U.vary_color({ latte = 0.15 }, 0.28) or 0.095 8 | 9 | local blockquote_bg = not O.transparent_background and C.mantle or nil 10 | 11 | local groups = { 12 | MarkviewBlockQuoteDefault = { fg = C.overlay2, bg = C.mantle }, 13 | MarkviewBlockQuoteError = { fg = C.red, bg = U.darken(C.red, darkening_percentage, blockquote_bg) }, 14 | MarkviewBlockQuoteNote = { fg = C.blue, bg = U.darken(C.blue, darkening_percentage, blockquote_bg) }, 15 | MarkviewBlockQuoteOk = { fg = C.green, bg = U.darken(C.green, darkening_percentage, blockquote_bg) }, 16 | MarkviewBlockQuoteSpecial = { fg = C.mauve, bg = U.darken(C.pink, darkening_percentage, blockquote_bg) }, 17 | MarkviewBlockQuoteWarn = { fg = C.yellow, bg = U.darken(C.yellow, darkening_percentage, blockquote_bg) }, 18 | 19 | MarkviewHyperlink = { link = "@markup.link.url" }, 20 | 21 | MarkviewCode = { bg = C.mantle }, 22 | MarkviewCodeFg = { fg = C.mantle }, 23 | MarkviewCodeInfo = { fg = C.overlay2, bg = C.mantle }, 24 | MarkviewInlineCode = { bg = C.surface0 }, 25 | 26 | MarkviewTableHeader = { fg = C.blue }, 27 | } 28 | 29 | local rainbow = { 30 | [0] = C.overlay2, 31 | [7] = C.mauve, 32 | } 33 | 34 | local syntax = require("catppuccin.groups.syntax").get() 35 | 36 | for i = 0, 7 do 37 | local color = rainbow[i] or syntax["rainbow" .. i].fg 38 | local bg = U.darken(color, darkening_percentage, C.base) 39 | groups["MarkviewPalette" .. i] = { fg = color, bg = bg } 40 | groups["MarkviewPalette" .. i .. "Fg"] = { fg = color } 41 | groups["MarkviewPalette" .. i .. "Bg"] = { bg = bg } 42 | groups["MarkviewIcon" .. i] = { fg = color, bg = C.mantle } 43 | end 44 | 45 | return groups 46 | end 47 | 48 | return M 49 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/mason.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local bg = O.transparent_background and C.none or C.lavender 5 | local fg = O.transparent_background and C.lavender or C.base 6 | 7 | local secondary_bg = O.transparent_background and C.none or C.blue 8 | local secondary_fg = O.transparent_background and C.blue or C.base 9 | 10 | local muted_bg = O.transparent_background and C.none or C.overlay0 11 | local muted_fg = O.transparent_background and C.overlay0 or C.base 12 | 13 | return { 14 | MasonHeader = { fg = fg, bg = bg, style = { "bold" } }, 15 | MasonHeaderSecondary = { fg = secondary_fg, bg = secondary_bg, style = { "bold" } }, 16 | 17 | MasonHighlight = { fg = C.green }, 18 | MasonHighlightBlock = { 19 | bg = O.transparent_background and C.none or C.green, 20 | fg = O.transparent_background and C.green or C.base, 21 | }, 22 | MasonHighlightBlockBold = { bg = secondary_bg, fg = secondary_fg, bold = true }, 23 | 24 | MasonHighlightSecondary = { fg = C.mauve }, 25 | MasonHighlightBlockSecondary = { fg = secondary_fg, bg = secondary_bg }, 26 | MasonHighlightBlockBoldSecondary = { fg = fg, bg = bg, bold = true }, 27 | 28 | MasonMuted = { fg = C.overlay0 }, 29 | MasonMutedBlock = { bg = muted_bg, fg = muted_fg }, 30 | MasonMutedBlockBold = { bg = C.yellow, fg = C.base, bold = true }, 31 | 32 | MasonError = { fg = C.red }, 33 | 34 | MasonHeading = { fg = C.lavender, bold = true }, 35 | } 36 | end 37 | 38 | return M 39 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/mini.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local transparent_background = require("catppuccin").options.transparent_background 5 | local bg_highlight = transparent_background and "NONE" or C.base 6 | 7 | local inactive_bg = transparent_background and "NONE" or C.mantle 8 | 9 | local indentscope_color = O.integrations.mini.indentscope_color 10 | return { 11 | MiniAnimateCursor = { style = { "reverse", "nocombine" } }, 12 | MiniAnimateNormalFloat = { link = "NormalFloat" }, 13 | 14 | MiniClueBorder = { link = "FloatBorder" }, 15 | MiniClueDescGroup = { link = "DiagnosticFloatingWarn" }, 16 | MiniClueDescSingle = { link = "NormalFloat" }, 17 | MiniClueNextKey = { link = "DiagnosticFloatingHint" }, 18 | MiniClueNextKeyWithPostkeys = { link = "DiagnosticFloatingError" }, 19 | MiniClueSeparator = { link = "DiagnosticFloatingInfo" }, 20 | MiniClueTitle = { link = "FloatTitle" }, 21 | 22 | MiniCompletionActiveParameter = { style = { "underline" } }, 23 | 24 | MiniCursorword = { style = { "underline" } }, 25 | MiniCursorwordCurrent = { style = { "underline" } }, 26 | 27 | MiniDepsChangeAdded = { link = "diffAdded" }, 28 | MiniDepsChangeRemoved = { link = "diffRemoved" }, 29 | MiniDepsHint = { link = "DiagnosticHint" }, 30 | MiniDepsInfo = { link = "DiagnosticInfo" }, 31 | MiniDepsMsgBreaking = { link = "DiagnosticWarn" }, 32 | MiniDepsPlaceholder = { link = "Comment" }, 33 | MiniDepsTitle = { link = "Title" }, 34 | MiniDepsTitleError = { bg = C.red, fg = C.base }, 35 | MiniDepsTitleSame = { link = "DiffText" }, 36 | MiniDepsTitleUpdate = { bg = C.green, fg = C.base }, 37 | 38 | MiniDiffSignAdd = { fg = C.green }, 39 | MiniDiffSignChange = { fg = C.yellow }, 40 | MiniDiffSignDelete = { fg = C.red }, 41 | MiniDiffOverAdd = { link = "DiffAdd" }, 42 | MiniDiffOverChange = { link = "DiffText" }, 43 | MiniDiffOverContext = { link = "DiffChange" }, 44 | MiniDiffOverDelete = { link = "DiffDelete" }, 45 | 46 | MiniFilesBorder = { link = "FloatBorder" }, 47 | MiniFilesBorderModified = { link = "DiagnosticFloatingWarn" }, 48 | MiniFilesCursorLine = { link = "CursorLine" }, 49 | MiniFilesDirectory = { link = "Directory" }, 50 | MiniFilesFile = { fg = C.text }, 51 | MiniFilesNormal = { link = "NormalFloat" }, 52 | MiniFilesTitle = { link = "FloatTitle" }, 53 | MiniFilesTitleFocused = { fg = C.subtext0, style = { "bold" } }, 54 | 55 | MiniHipatternsFixme = { fg = C.base, bg = C.red, style = { "bold" } }, 56 | MiniHipatternsHack = { fg = C.base, bg = C.yellow, style = { "bold" } }, 57 | MiniHipatternsNote = { fg = C.base, bg = C.sky, style = { "bold" } }, 58 | MiniHipatternsTodo = { fg = C.base, bg = C.teal, style = { "bold" } }, 59 | 60 | MiniIconsAzure = { fg = C.sapphire }, 61 | MiniIconsBlue = { fg = C.blue }, 62 | MiniIconsCyan = { fg = C.teal }, 63 | MiniIconsGreen = { fg = C.green }, 64 | MiniIconsGrey = { fg = C.text }, 65 | MiniIconsOrange = { fg = C.peach }, 66 | MiniIconsPurple = { fg = C.mauve }, 67 | MiniIconsRed = { fg = C.red }, 68 | MiniIconsYellow = { fg = C.yellow }, 69 | 70 | MiniIndentscopeSymbol = { fg = C[indentscope_color] or C.overlay2 }, 71 | 72 | MiniJump = { fg = C.overlay2, bg = C.pink }, 73 | 74 | MiniJump2dDim = { fg = C.overlay0 }, 75 | MiniJump2dSpot = { bg = C.base, fg = C.peach, style = { "bold", "underline" } }, 76 | MiniJump2dSpotAhead = { bg = C.dim, fg = C.teal }, 77 | MiniJump2dSpotUnique = { bg = C.base, fg = C.sky, style = { "bold" } }, 78 | 79 | MiniMapNormal = { link = "NormalFloat" }, 80 | MiniMapSymbolCount = { link = "Special" }, 81 | MiniMapSymbolLine = { link = "Title" }, 82 | MiniMapSymbolView = { link = "Delimiter" }, 83 | 84 | MiniNotifyBorder = { link = "FloatBorder" }, 85 | MiniNotifyNormal = { link = "NormalFloat" }, 86 | MiniNotifyTitle = { link = "FloatTitle" }, 87 | 88 | MiniOperatorsExchangeFrom = { link = "IncSearch" }, 89 | 90 | MiniPickBorder = { link = "FloatBorder" }, 91 | MiniPickBorderBusy = { link = "DiagnosticFloatingWarn" }, 92 | MiniPickBorderText = { fg = C.mauve }, 93 | MiniPickIconDirectory = { link = "Directory" }, 94 | MiniPickIconFile = { link = "MiniPickNormal" }, 95 | MiniPickHeader = { link = "DiagnosticFloatingHint" }, 96 | MiniPickMatchCurrent = { link = "CursorLine" }, 97 | MiniPickMatchMarked = { link = "Visual" }, 98 | MiniPickMatchRanges = { link = "DiagnosticFloatingHint" }, 99 | MiniPickNormal = { link = "NormalFloat" }, 100 | MiniPickPreviewLine = { link = "CursorLine" }, 101 | MiniPickPreviewRegion = { link = "IncSearch" }, 102 | MiniPickPrompt = { link = "DiagnosticFloatingInfo" }, 103 | 104 | MiniStarterCurrent = {}, 105 | MiniStarterFooter = { fg = C.yellow, style = { "italic" } }, 106 | MiniStarterHeader = { fg = C.blue }, 107 | MiniStarterInactive = { fg = C.surface2, style = O.styles.comments }, 108 | MiniStarterItem = { fg = C.text }, 109 | MiniStarterItemBullet = { fg = C.blue }, 110 | MiniStarterItemPrefix = { fg = C.pink }, 111 | MiniStarterSection = { fg = C.flamingo }, 112 | MiniStarterQuery = { fg = C.green }, 113 | 114 | MiniStatuslineDevinfo = { fg = C.subtext1, bg = C.surface1 }, 115 | MiniStatuslineFileinfo = { fg = C.subtext1, bg = C.surface1 }, 116 | MiniStatuslineFilename = { fg = C.text, bg = C.mantle }, 117 | MiniStatuslineInactive = { fg = C.blue, bg = C.mantle }, 118 | MiniStatuslineModeCommand = { fg = C.base, bg = C.peach, style = { "bold" } }, 119 | MiniStatuslineModeInsert = { fg = C.base, bg = C.green, style = { "bold" } }, 120 | MiniStatuslineModeNormal = { fg = C.mantle, bg = C.blue, style = { "bold" } }, 121 | MiniStatuslineModeOther = { fg = C.base, bg = C.teal, style = { "bold" } }, 122 | MiniStatuslineModeReplace = { fg = C.base, bg = C.red, style = { "bold" } }, 123 | MiniStatuslineModeVisual = { fg = C.base, bg = C.mauve, style = { "bold" } }, 124 | 125 | MiniSurround = { bg = C.pink, fg = C.surface1 }, 126 | 127 | MiniTablineCurrent = { fg = C.text, bg = C.base, sp = C.red, style = { "bold", "italic", "underline" } }, 128 | MiniTablineFill = { bg = bg_highlight }, 129 | MiniTablineHidden = { fg = C.text, bg = inactive_bg }, 130 | MiniTablineModifiedCurrent = { fg = C.red, bg = C.none, style = { "bold", "italic" } }, 131 | MiniTablineModifiedHidden = { fg = C.red, bg = C.none }, 132 | MiniTablineModifiedVisible = { fg = C.red, bg = C.none }, 133 | MiniTablineTabpagesection = { fg = C.surface1, bg = C.base }, 134 | MiniTablineVisible = { bg = C.none }, 135 | 136 | MiniTestEmphasis = { style = { "bold" } }, 137 | MiniTestFail = { fg = C.red, style = { "bold" } }, 138 | MiniTestPass = { fg = C.green, style = { "bold" } }, 139 | 140 | MiniTrailspace = { bg = C.red }, 141 | } 142 | end 143 | 144 | return M 145 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/native_lsp.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local virtual_text = O.integrations.native_lsp.virtual_text 5 | local underlines = O.integrations.native_lsp.underlines 6 | local inlay_hints = O.integrations.native_lsp.inlay_hints 7 | 8 | local error = C.red 9 | local warning = C.yellow 10 | local info = C.sky 11 | local hint = C.teal 12 | local ok = C.green 13 | local darkening_percentage = 0.095 14 | 15 | return { 16 | -- These groups are for the native LSP client. Some other LSP clients may 17 | -- use these groups, or use their own. Consult your LSP client's 18 | -- documentation. 19 | LspReferenceText = { bg = C.surface1 }, -- used for highlighting "text" references 20 | LspReferenceRead = { bg = C.surface1 }, -- used for highlighting "read" references 21 | LspReferenceWrite = { bg = C.surface1 }, -- used for highlighting "write" references 22 | -- highlight diagnostics in numberline 23 | 24 | DiagnosticVirtualTextError = { 25 | bg = O.transparent_background and C.none or U.darken(error, darkening_percentage, C.base), 26 | fg = error, 27 | style = virtual_text.errors, 28 | }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 29 | DiagnosticVirtualTextWarn = { 30 | bg = O.transparent_background and C.none or U.darken(warning, darkening_percentage, C.base), 31 | fg = warning, 32 | style = virtual_text.warnings, 33 | }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 34 | DiagnosticVirtualTextInfo = { 35 | bg = O.transparent_background and C.none or U.darken(info, darkening_percentage, C.base), 36 | fg = info, 37 | style = virtual_text.information, 38 | }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 39 | DiagnosticVirtualTextHint = { 40 | bg = O.transparent_background and C.none or U.darken(hint, darkening_percentage, C.base), 41 | fg = hint, 42 | style = virtual_text.hints, 43 | }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 44 | DiagnosticVirtualTextOk = { 45 | bg = O.transparent_background and C.none or U.darken(hint, darkening_percentage, C.base), 46 | fg = ok, 47 | style = virtual_text.ok, 48 | }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 49 | 50 | DiagnosticError = { bg = C.none, fg = error, style = virtual_text.errors }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 51 | DiagnosticWarn = { bg = C.none, fg = warning, style = virtual_text.warnings }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 52 | DiagnosticInfo = { bg = C.none, fg = info, style = virtual_text.information }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 53 | DiagnosticHint = { bg = C.none, fg = hint, style = virtual_text.hints }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 54 | DiagnosticOk = { bg = C.none, fg = ok, style = virtual_text.ok }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default 55 | 56 | DiagnosticUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics 57 | DiagnosticUnderlineWarn = { style = underlines.warnings, sp = warning }, -- Used to underline "Warn" diagnostics 58 | DiagnosticUnderlineInfo = { style = underlines.information, sp = info }, -- Used to underline "Info" diagnostics 59 | DiagnosticUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics 60 | DiagnosticUnderlineOk = { style = underlines.ok, sp = ok }, -- Used to underline "Ok" diagnostics 61 | 62 | DiagnosticFloatingError = { fg = error }, -- Used to color "Error" diagnostic messages in diagnostics float 63 | DiagnosticFloatingWarn = { fg = warning }, -- Used to color "Warn" diagnostic messages in diagnostics float 64 | DiagnosticFloatingInfo = { fg = info }, -- Used to color "Info" diagnostic messages in diagnostics float 65 | DiagnosticFloatingHint = { fg = hint }, -- Used to color "Hint" diagnostic messages in diagnostics float 66 | DiagnosticFloatingOk = { fg = ok }, -- Used to color "Ok" diagnostic messages in diagnostics float 67 | 68 | DiagnosticSignError = { fg = error }, -- Used for "Error" signs in sign column 69 | DiagnosticSignWarn = { fg = warning }, -- Used for "Warn" signs in sign column 70 | DiagnosticSignInfo = { fg = info }, -- Used for "Info" signs in sign column 71 | DiagnosticSignHint = { fg = hint }, -- Used for "Hint" signs in sign column 72 | DiagnosticSignOk = { fg = ok }, -- Used for "Ok" signs in sign column 73 | 74 | LspDiagnosticsDefaultError = { fg = error }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) 75 | LspDiagnosticsDefaultWarning = { fg = warning }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) 76 | LspDiagnosticsDefaultInformation = { fg = info }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) 77 | LspDiagnosticsDefaultHint = { fg = hint }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline) 78 | LspSignatureActiveParameter = { bg = C.surface0, style = { "bold" } }, 79 | -- LspDiagnosticsFloatingError = { }, -- Used to color "Error" diagnostic messages in diagnostics float 80 | -- LspDiagnosticsFloatingWarning = { }, -- Used to color "Warning" diagnostic messages in diagnostics float 81 | -- LspDiagnosticsFloatingInformation = { }, -- Used to color "Information" diagnostic messages in diagnostics float 82 | -- LspDiagnosticsFloatingHint = { }, -- Used to color "Hint" diagnostic messages in diagnostics float 83 | 84 | LspDiagnosticsError = { fg = error }, 85 | LspDiagnosticsWarning = { fg = warning }, 86 | LspDiagnosticsInformation = { fg = info }, 87 | LspDiagnosticsHint = { fg = hint }, 88 | LspDiagnosticsVirtualTextError = { fg = error, style = virtual_text.errors }, -- Used for "Error" diagnostic virtual text 89 | LspDiagnosticsVirtualTextWarning = { fg = warning, style = virtual_text.warnings }, -- Used for "Warning" diagnostic virtual text 90 | LspDiagnosticsVirtualTextInformation = { fg = info, style = virtual_text.warnings }, -- Used for "Information" diagnostic virtual text 91 | LspDiagnosticsVirtualTextHint = { fg = hint, style = virtual_text.hints }, -- Used for "Hint" diagnostic virtual text 92 | LspDiagnosticsUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics 93 | LspDiagnosticsUnderlineWarning = { style = underlines.warnings, sp = warning }, -- Used to underline "Warning" diagnostics 94 | LspDiagnosticsUnderlineInformation = { style = underlines.information, sp = info }, -- Used to underline "Information" diagnostics 95 | LspDiagnosticsUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics 96 | LspCodeLens = { fg = C.overlay0 }, -- virtual text of the codelens 97 | LspCodeLensSeparator = { link = "LspCodeLens" }, -- virtual text of the codelens separators 98 | LspInlayHint = { 99 | -- fg of `Comment` 100 | fg = C.overlay0, 101 | -- bg of `CursorLine` 102 | bg = (O.transparent_background or not inlay_hints.background) and C.none 103 | or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), 104 | }, -- virtual text of the inlay hints 105 | LspInfoBorder = { link = "FloatBorder" }, -- LspInfo border 106 | } 107 | end 108 | 109 | return M 110 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/navic.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local background = O.integrations.navic.custom_bg and O.integrations.navic.custom_bg or C.none 5 | if O.integrations.navic.custom_bg == "lualine" then background = C.mantle end 6 | 7 | return { 8 | NavicIconsFile = { fg = C.blue, bg = background }, 9 | NavicIconsModule = { fg = C.blue, bg = background }, 10 | NavicIconsNamespace = { fg = C.blue, bg = background }, 11 | NavicIconsPackage = { fg = C.blue, bg = background }, 12 | NavicIconsClass = { fg = C.yellow, bg = background }, 13 | NavicIconsMethod = { fg = C.blue, bg = background }, 14 | NavicIconsProperty = { fg = C.green, bg = background }, 15 | NavicIconsField = { fg = C.green, bg = background }, 16 | NavicIconsConstructor = { fg = C.blue, bg = background }, 17 | NavicIconsEnum = { fg = C.green, bg = background }, 18 | NavicIconsInterface = { fg = C.yellow, bg = background }, 19 | NavicIconsFunction = { fg = C.blue, bg = background }, 20 | NavicIconsVariable = { fg = C.flamingo, bg = background }, 21 | NavicIconsConstant = { fg = C.peach, bg = background }, 22 | NavicIconsString = { fg = C.green, style = O.styles.strings, bg = background }, 23 | NavicIconsNumber = { fg = C.peach, bg = background }, 24 | NavicIconsBoolean = { fg = C.peach, bg = background }, 25 | NavicIconsArray = { fg = C.peach, bg = background }, 26 | NavicIconsObject = { fg = C.peach, bg = background }, 27 | NavicIconsKey = { fg = C.pink, style = O.styles.keywords, bg = background }, 28 | NavicIconsNull = { fg = C.peach, bg = background }, 29 | NavicIconsEnumMember = { fg = C.red, bg = background }, 30 | NavicIconsStruct = { fg = C.blue, bg = background }, 31 | NavicIconsEvent = { fg = C.blue, bg = background }, 32 | NavicIconsOperator = { fg = C.sky, bg = background }, 33 | NavicIconsTypeParameter = { fg = C.blue, bg = background }, 34 | NavicText = { fg = C.sapphire, bg = background }, 35 | NavicSeparator = { fg = C.text, bg = background }, 36 | } 37 | end 38 | 39 | return M 40 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/neogit.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NeogitBranch = { 6 | fg = C.peach, 7 | style = { "bold" }, 8 | }, 9 | NeogitRemote = { 10 | fg = C.green, 11 | style = { "bold" }, 12 | }, 13 | NeogitUnmergedInto = { 14 | link = "Function", 15 | }, 16 | NeogitUnpulledFrom = { 17 | link = "Function", 18 | }, 19 | NeogitObjectId = { 20 | link = "Comment", 21 | }, 22 | NeogitStash = { 23 | link = "Comment", 24 | }, 25 | NeogitRebaseDone = { 26 | link = "Comment", 27 | }, 28 | NeogitHunkHeader = { 29 | bg = U.darken(C.blue, 0.095, C.base), 30 | fg = U.darken(C.blue, 0.5, C.base), 31 | }, 32 | NeogitHunkHeaderHighlight = { 33 | bg = U.darken(C.blue, 0.215, C.base), 34 | fg = C.blue, 35 | }, 36 | NeogitDiffContextHighlight = { 37 | bg = C.surface0, 38 | }, 39 | NeogitDiffDeleteHighlight = { 40 | bg = U.darken(C.red, 0.345, C.base), 41 | fg = U.lighten(C.red, 0.850, C.text), 42 | }, 43 | NeogitDiffAddHighlight = { 44 | bg = U.darken(C.green, 0.345, C.base), 45 | fg = U.lighten(C.green, 0.850, C.text), 46 | }, 47 | NeogitDiffDelete = { 48 | bg = U.darken(C.red, 0.095, C.base), 49 | fg = U.darken(C.red, 0.800, C.base), 50 | }, 51 | NeogitDiffAdd = { 52 | bg = U.darken(C.green, 0.095, C.base), 53 | fg = U.darken(C.green, 0.800, C.base), 54 | }, 55 | NeogitCommitViewHeader = { 56 | bg = U.darken(C.blue, 0.300, C.base), 57 | fg = U.lighten(C.blue, 0.800, C.text), 58 | }, 59 | NeogitChangeModified = { 60 | fg = C.blue, 61 | style = { "bold" }, 62 | }, 63 | NeogitChangeDeleted = { 64 | fg = C.red, 65 | style = { "bold" }, 66 | }, 67 | NeogitChangeAdded = { 68 | fg = C.green, 69 | style = { "bold" }, 70 | }, 71 | NeogitChangeRenamed = { 72 | fg = C.mauve, 73 | style = { "bold" }, 74 | }, 75 | NeogitChangeUpdated = { 76 | fg = C.peach, 77 | style = { "bold" }, 78 | }, 79 | NeogitChangeCopied = { 80 | fg = C.pink, 81 | style = { "bold" }, 82 | }, 83 | NeogitChangeBothModified = { 84 | fg = C.yellow, 85 | style = { "bold" }, 86 | }, 87 | NeogitChangeNewFile = { 88 | fg = C.green, 89 | style = { "bold" }, 90 | }, 91 | NeogitUntrackedfiles = { 92 | fg = C.mauve, 93 | style = { "bold" }, 94 | }, 95 | NeogitUnstagedchanges = { 96 | fg = C.mauve, 97 | style = { "bold" }, 98 | }, 99 | NeogitUnmergedchanges = { 100 | fg = C.mauve, 101 | style = { "bold" }, 102 | }, 103 | NeogitUnpulledchanges = { 104 | fg = C.mauve, 105 | style = { "bold" }, 106 | }, 107 | NeogitRecentcommits = { 108 | fg = C.mauve, 109 | style = { "bold" }, 110 | }, 111 | NeogitStagedchanges = { 112 | fg = C.mauve, 113 | style = { "bold" }, 114 | }, 115 | NeogitStashes = { 116 | fg = C.mauve, 117 | style = { "bold" }, 118 | }, 119 | NeogitRebasing = { 120 | fg = C.mauve, 121 | style = { "bold" }, 122 | }, 123 | NeogitNotificationInfo = { 124 | fg = C.blue, 125 | }, 126 | NeogitNotificationWarning = { 127 | fg = C.yellow, 128 | }, 129 | NeogitNotificationError = { 130 | fg = C.red, 131 | }, 132 | NeogitGraphRed = { 133 | fg = C.red, 134 | }, 135 | NeogitGraphWhite = { 136 | fg = C.base, 137 | }, 138 | NeogitGraphYellow = { 139 | fg = C.yellow, 140 | }, 141 | NeogitGraphGreen = { 142 | fg = C.green, 143 | }, 144 | NeogitGraphCyan = { 145 | fg = C.blue, 146 | }, 147 | NeogitGraphBlue = { 148 | fg = C.blue, 149 | }, 150 | NeogitGraphPurple = { 151 | fg = C.lavender, 152 | }, 153 | NeogitGraphGray = { 154 | fg = C.subtext1, 155 | }, 156 | NeogitGraphOrange = { 157 | fg = C.peach, 158 | }, 159 | NeogitGraphBoldRed = { 160 | fg = C.red, 161 | style = { "bold" }, 162 | }, 163 | NeogitGraphBoldWhite = { 164 | fg = C.white, 165 | style = { "bold" }, 166 | }, 167 | NeogitGraphBoldYellow = { 168 | fg = C.yellow, 169 | style = { "bold" }, 170 | }, 171 | NeogitGraphBoldGreen = { 172 | fg = C.green, 173 | style = { "bold" }, 174 | }, 175 | NeogitGraphBoldCyan = { 176 | fg = C.blue, 177 | style = { "bold" }, 178 | }, 179 | NeogitGraphBoldBlue = { 180 | fg = C.blue, 181 | style = { "bold" }, 182 | }, 183 | NeogitGraphBoldPurple = { 184 | fg = C.lavender, 185 | style = { "bold" }, 186 | }, 187 | NeogitGraphBoldGray = { 188 | fg = C.subtext1, 189 | style = { "bold" }, 190 | }, 191 | NeogitDiffContext = { 192 | bg = C.base, 193 | }, 194 | NeogitPopupBold = { 195 | style = { "bold" }, 196 | }, 197 | NeogitPopupSwitchKey = { 198 | fg = C.lavender, 199 | }, 200 | NeogitPopupOptionKey = { 201 | fg = C.lavender, 202 | }, 203 | NeogitPopupConfigKey = { 204 | fg = C.lavender, 205 | }, 206 | NeogitPopupActionKey = { 207 | fg = C.lavender, 208 | }, 209 | NeogitFilePath = { 210 | fg = C.blue, 211 | style = { "italic" }, 212 | }, 213 | NeogitDiffHeader = { 214 | bg = C.base, 215 | fg = C.blue, 216 | style = { "bold" }, 217 | }, 218 | NeogitDiffHeaderHighlight = { 219 | bg = C.base, 220 | fg = C.peach, 221 | style = { "bold" }, 222 | }, 223 | NeogitUnpushedTo = { 224 | fg = C.lavender, 225 | style = { "bold" }, 226 | }, 227 | NeogitFold = { 228 | fg = C.none, 229 | bg = C.none, 230 | }, 231 | NeogitSectionHeader = { 232 | fg = C.mauve, 233 | style = { "bold" }, 234 | }, 235 | NeogitTagName = { 236 | fg = C.yellow, 237 | }, 238 | NeogitTagDistance = { 239 | fg = C.blue, 240 | }, 241 | NeogitWinSeparator = { 242 | link = "WinSeparator", 243 | }, 244 | } 245 | end 246 | 247 | return M 248 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/neotest.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NeotestPassed = { fg = C.green }, 6 | NeotestFailed = { fg = C.red }, 7 | NeotestRunning = { fg = C.yellow }, 8 | NeotestSkipped = { fg = C.blue }, 9 | NeotestTest = { fg = C.text }, 10 | NeotestNamespace = { fg = C.mauve }, 11 | NeotestFocused = { style = { "bold", "underline" } }, 12 | NeotestFile = { fg = C.blue }, 13 | NeotestDir = { fg = C.blue }, 14 | NeotestIndent = { fg = C.overlay1 }, 15 | NeotestExpandMarker = { fg = C.overlay1 }, 16 | NeotestAdapterName = { fg = C.maroon }, 17 | NeotestWinSelect = { fg = C.blue, style = { "bold" } }, 18 | NeotestMarked = { fg = C.peach, style = { "bold" } }, 19 | NeotestTarget = { fg = C.red }, 20 | NeotestUnknown = { fg = C.text }, 21 | } 22 | end 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/neotree.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local active_bg = O.transparent_background and C.none or C.mantle 5 | local inactive_bg = O.transparent_background and C.none or C.base 6 | return { 7 | NeoTreeDirectoryName = { fg = C.blue }, 8 | NeoTreeDirectoryIcon = { fg = C.blue }, 9 | NeoTreeNormal = { fg = C.text, bg = active_bg }, 10 | NeoTreeNormalNC = { fg = C.text, bg = active_bg }, 11 | NeoTreeExpander = { fg = C.overlay0 }, 12 | NeoTreeIndentMarker = { fg = C.overlay0 }, 13 | NeoTreeRootName = { fg = C.blue, style = { "bold" } }, 14 | NeoTreeSymbolicLinkTarget = { fg = C.pink }, 15 | NeoTreeModified = { fg = C.peach }, 16 | 17 | NeoTreeGitAdded = { fg = C.green }, 18 | NeoTreeGitConflict = { fg = C.red }, 19 | NeoTreeGitDeleted = { fg = C.red }, 20 | NeoTreeGitIgnored = { fg = C.overlay0 }, 21 | NeoTreeGitModified = { fg = C.yellow }, 22 | NeoTreeGitUnstaged = { fg = C.red }, 23 | NeoTreeGitUntracked = { fg = C.mauve }, 24 | NeoTreeGitStaged = { fg = C.green }, 25 | 26 | NeoTreeFloatBorder = { link = "FloatBorder" }, 27 | NeoTreeFloatTitle = { link = "FloatTitle" }, 28 | NeoTreeTitleBar = { fg = C.mantle, bg = C.blue }, 29 | 30 | NeoTreeFileNameOpened = { fg = C.pink }, 31 | NeoTreeDimText = { fg = C.overlay1 }, 32 | NeoTreeFilterTerm = { fg = C.green, style = { "bold" } }, 33 | NeoTreeTabActive = { bg = active_bg, fg = C.lavender, style = { "bold" } }, 34 | NeoTreeTabInactive = { bg = inactive_bg, fg = C.overlay0 }, 35 | NeoTreeTabSeparatorActive = { fg = active_bg, bg = active_bg }, 36 | NeoTreeTabSeparatorInactive = { fg = inactive_bg, bg = inactive_bg }, 37 | NeoTreeVertSplit = { fg = C.base, bg = inactive_bg }, 38 | NeoTreeWinSeparator = { 39 | fg = O.transparent_background and C.surface1 or C.base, 40 | bg = O.transparent_background and C.none or C.base, 41 | }, 42 | NeoTreeStatusLineNC = { fg = C.mantle, bg = C.mantle }, 43 | } 44 | end 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/noice.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local virtual_text = O.integrations.native_lsp.virtual_text 4 | 5 | function M.get() 6 | return { -- Personally the default integration is already pretty good 7 | NoiceCmdline = { fg = C.text }, 8 | NoiceCmdlineIcon = { fg = C.sky, style = virtual_text.information }, 9 | NoiceCmdlineIconSearch = { fg = C.yellow }, 10 | NoiceCmdlinePopupBorder = { fg = C.lavender }, 11 | NoiceCmdlinePopupBorderSearch = { fg = C.yellow }, 12 | NoiceConfirmBorder = { fg = C.blue }, 13 | NoiceMini = { fg = C.subtext0, blend = 0 }, 14 | NoiceFormatProgressDone = { 15 | bg = O.transparent_background and C.none or U.darken(C.sky, 0.30, C.base), 16 | fg = C.subtext0, 17 | }, 18 | NoiceFormatProgressTodo = { 19 | bg = O.transparent_background and C.none 20 | or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), 21 | fg = C.subtext0, 22 | }, 23 | } 24 | end 25 | 26 | return M 27 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/notifier.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NotifierIcon = { fg = C.mauve }, 6 | NotifierContent = { fg = C.overlay2, blend = 0, style = { "italic" } }, 7 | NotifierContentDim = { fg = C.overlay1, blend = 0, style = { "italic" } }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/notify.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NotifyBackground = { bg = (O.transparent_background and vim.o.winblend == 0) and "#000000" or C.mantle }, 6 | 7 | NotifyERRORBorder = { fg = C.red }, 8 | NotifyERRORIcon = { fg = C.red }, 9 | NotifyERRORTitle = { fg = C.red, style = { "italic" } }, 10 | NotifyWARNBorder = { fg = C.yellow }, 11 | NotifyWARNIcon = { fg = C.yellow }, 12 | NotifyWARNTitle = { fg = C.yellow, style = { "italic" } }, 13 | NotifyINFOBorder = { fg = C.blue }, 14 | NotifyINFOIcon = { fg = C.blue }, 15 | NotifyINFOTitle = { fg = C.blue, style = { "italic" } }, 16 | NotifyDEBUGBorder = { fg = C.peach }, 17 | NotifyDEBUGIcon = { fg = C.peach }, 18 | NotifyDEBUGTitle = { fg = C.peach, style = { "italic" } }, 19 | NotifyTRACEBorder = { fg = C.rosewater }, 20 | NotifyTRACEIcon = { fg = C.rosewater }, 21 | NotifyTRACETitle = { fg = C.rosewater, style = { "italic" } }, 22 | } 23 | end 24 | 25 | return M 26 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/nvim_surround.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NvimSurroundHighlight = { sp = C.peach, style = { "underline" } }, 6 | } 7 | end 8 | 9 | return M 10 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/nvimtree.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | NvimTreeFolderName = { fg = C.blue }, 6 | NvimTreeFolderIcon = { fg = C.blue }, 7 | NvimTreeNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, 8 | NvimTreeOpenedFolderName = { fg = C.blue }, 9 | NvimTreeEmptyFolderName = { fg = C.blue }, 10 | NvimTreeIndentMarker = { fg = C.overlay0 }, 11 | NvimTreeWinSeparator = { 12 | fg = O.transparent_background and C.surface1 or C.base, 13 | bg = O.transparent_background and C.none or C.base, 14 | }, 15 | NvimTreeRootFolder = { fg = C.lavender, style = { "bold" } }, 16 | NvimTreeSymlink = { fg = C.pink }, 17 | NvimTreeStatuslineNc = { fg = C.mantle, bg = C.mantle }, 18 | NvimTreeGitDirty = { fg = C.yellow }, 19 | NvimTreeGitNew = { fg = C.blue }, 20 | NvimTreeGitDeleted = { fg = C.red }, 21 | NvimTreeSpecialFile = { fg = C.flamingo }, 22 | NvimTreeImageFile = { fg = C.text }, 23 | NvimTreeOpenedFile = { fg = C.pink }, 24 | } 25 | end 26 | 27 | return M 28 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/octo.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | -- colors 6 | OctoGrey = { fg = C.base }, 7 | OctoBlue = { fg = C.blue }, 8 | OctoGreen = { fg = C.green }, 9 | OctoRed = { fg = C.red }, 10 | OctoPurple = { fg = C.mauve }, 11 | OctoYellow = { fg = C.yellow }, 12 | -- highlight groups 13 | OctoDirty = { link = "ErrorMsg" }, 14 | OctoIssueTitle = { link = "PreProc" }, 15 | OctoIssueId = { link = "Question" }, 16 | OctoEmpty = { link = "Comment" }, 17 | OctoFloat = { link = "NormalNC" }, 18 | OctoDate = { link = "Comment" }, 19 | OctoSymbol = { link = "Comment" }, 20 | OctoTimelineItemHeading = { link = "Comment" }, 21 | OctoDetailsLabel = { link = "Title" }, 22 | OctoMissingDetails = { link = "Comment" }, 23 | OctoDetailsValue = { link = "Identifier" }, 24 | OctoDiffHunkPosition = { link = "NormalFloat" }, 25 | OctoCommentLine = { link = "TabLineSel" }, 26 | OctoViewer = { fg = C.base, bg = C.blue }, 27 | OctoBubble = { fg = C.text, bg = C.base }, 28 | OctoBubbleGrey = { fg = C.text, bg = C.base }, 29 | OctoBubbleDelimiterGrey = { fg = C.base }, 30 | OctoBubbleGreen = { fg = C.base, bg = C.green }, 31 | OctoBubbleDelimiterGreen = { fg = C.green }, 32 | OctoBubbleBlue = { fg = C.base, bg = C.sky }, 33 | OctoBubbleDelimiterBlue = { fg = C.sky }, 34 | OctoBubbleYellow = { fg = C.base, bg = C.yellow }, 35 | OctoBubbleDelimiterYellow = { fg = C.yellow }, 36 | OctoBubbleRed = { fg = C.base, bg = C.red }, 37 | OctoBubbleDelimiterRed = { fg = C.red }, 38 | OctoBubblePurple = { fg = C.base, bg = C.mauve }, 39 | OctoBubbleDelimiterPurple = { fg = C.mauve }, 40 | OctoUser = { link = "OctoBubble" }, 41 | OctoUserViewer = { link = "OctoViewer" }, 42 | OctoReaction = { link = "OctoBubble" }, 43 | OctoReactionViewer = { link = "OctoViewer" }, 44 | OctoPassingTest = { link = "OctoGreen" }, 45 | OctoFailingTest = { link = "OctoRed" }, 46 | OctoPullAdditions = { link = "OctoGreen" }, 47 | OctoPullDeletions = { link = "OctoRed" }, 48 | OctoPullModifications = { fg = C.peach }, 49 | OctoStateOpen = { fg = C.green, bg = C.base }, 50 | OctoStateOpenFloat = { fg = C.green, bg = C.base }, 51 | OctoStateClosed = { fg = C.red, bg = C.base }, 52 | OctoStateClosedFloat = { fg = C.red, bg = C.base }, 53 | OctoStateMerged = { fg = C.mauve, bg = C.base }, 54 | OctoStateMergedFloat = { fg = C.mauve, bg = C.base }, 55 | OctoStatePending = { fg = C.peach, bg = C.base }, 56 | OctoStatePendingFloat = { fg = C.peach, bg = C.base }, 57 | OctoStateApproved = { link = "OctoStateOpen" }, 58 | OctoStateApprovedFloat = { link = "OctoStateOpen" }, 59 | OctoStateChangesRequested = { fg = C.maroon, bg = C.base }, 60 | OctoStateChangesRequestedFloat = { fg = C.maroon, bg = C.base }, 61 | OctoStateCommented = { link = "Normal" }, 62 | OctoStateCommentedFloat = { link = "Normal" }, 63 | OctoStateDismissed = { link = "OctoStateClosed" }, 64 | OctoStateDismissedFloat = { link = "OctoStateClosed" }, 65 | OctoStateSubmittedBubble = { link = "OctoBubbleGreen" }, 66 | OctoFilePanelCounter = { fg = C.blue, style = { "bold" } }, 67 | OctoFilePanelTitle = { fg = C.blue, style = { "bold" } }, 68 | OctoNormalFront = { fg = C.text }, 69 | OctoYellowFloat = { fg = C.yellow, bg = C.base }, 70 | OctoPurpleFloat = { fg = C.mauve, bg = C.base }, 71 | OctoRedFloat = { fg = C.red, bg = C.base }, 72 | OctoGreenFloat = { fg = C.green, bg = C.base }, 73 | OctoGreyFloat = { fg = C.text, bg = C.base }, 74 | OctoBlueFloat = { fg = C.blue, bg = C.base }, 75 | } 76 | end 77 | 78 | return M 79 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/overseer.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | OverseerPENDING = { fg = C.grey }, 6 | OverseerRUNNING = { fg = C.yellow }, 7 | OverseerSUCCESS = { fg = C.green }, 8 | OverseerCANCELED = { fg = C.overlay2 }, 9 | OverseerFAILURE = { fg = C.red }, 10 | OverseerTask = { fg = C.blue }, 11 | OverseerTaskBorder = { fg = C.sky }, 12 | OverseerOutput = { fg = C.text }, 13 | OverseerComponent = { fg = C.yellow }, 14 | OverseerField = { fg = C.green }, 15 | } 16 | end 17 | 18 | return M 19 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/pounce.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | PounceMatch = { bg = U.lighten(C.green, 0.7), fg = C.base, style = { "bold" } }, 6 | PounceGap = { bg = U.darken(C.green, 0.7), fg = C.base, style = { "bold" } }, 7 | PounceAccept = { bg = C.peach, fg = C.base, style = { "bold" } }, 8 | PounceAcceptBest = { bg = C.teal, fg = C.base, style = { "bold" } }, 9 | } 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/rainbow_delimiters.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | RainbowDelimiterRed = { fg = C.red }, 6 | RainbowDelimiterYellow = { fg = C.yellow }, 7 | RainbowDelimiterBlue = { fg = C.blue }, 8 | RainbowDelimiterOrange = { fg = C.peach }, 9 | RainbowDelimiterGreen = { fg = C.green }, 10 | RainbowDelimiterViolet = { fg = C.mauve }, 11 | RainbowDelimiterCyan = { fg = C.teal }, 12 | } 13 | end 14 | 15 | return M 16 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/render_markdown.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | -- render-markdown.nvim highlight groups: 4 | -- https://github.com/MeanderingProgrammer/render-markdown.nvim?tab=readme-ov-file#colors 5 | 6 | function M.get() 7 | local groups = { 8 | RenderMarkdownCode = { bg = C.mantle }, 9 | RenderMarkdownCodeInline = { bg = C.surface0 }, 10 | RenderMarkdownBullet = { fg = C.sky }, 11 | RenderMarkdownTableHead = { fg = C.blue }, 12 | RenderMarkdownTableRow = { fg = C.lavender }, 13 | RenderMarkdownSuccess = { fg = C.green }, 14 | RenderMarkdownInfo = { fg = C.sky }, 15 | RenderMarkdownHint = { fg = C.teal }, 16 | RenderMarkdownWarn = { fg = C.yellow }, 17 | RenderMarkdownError = { fg = C.red }, 18 | } 19 | 20 | local syntax = require("catppuccin.groups.syntax").get() 21 | local darkening_percentage = O.transparent_background and U.vary_color({ latte = 0.15 }, 0.28) or 0.095 22 | 23 | for i = 1, 6 do 24 | local color = syntax["rainbow" .. i].fg 25 | groups["RenderMarkdownH" .. i] = { fg = color } 26 | groups["RenderMarkdownH" .. i .. "Bg"] = { bg = U.darken(color, darkening_percentage, C.base) } 27 | end 28 | 29 | return groups 30 | end 31 | 32 | return M 33 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/sandwich.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | OperatorSandwichAdd = { bg = C.blue, fg = C.base }, 6 | OperatorSandwichBuns = { bg = C.blue, fg = C.base }, 7 | OperatorSandwichChange = { bg = C.blue, fg = C.base }, 8 | OperatorSandwichDelete = { bg = C.blue, fg = C.base }, 9 | } 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/semantic_tokens.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | if vim.treesitter.highlighter.hl_map then 5 | vim.notify_once( 6 | [[Catppuccin (info): 7 | semantic_tokens integration requires neovim 0.8 8 | If you want to stay on nvim 0.7, disable the integration. 9 | ]], 10 | vim.log.levels.INFO 11 | ) 12 | return {} 13 | end 14 | return { 15 | ["@lsp.type.boolean"] = { link = "@boolean" }, 16 | ["@lsp.type.builtinType"] = { link = "@type.builtin" }, 17 | ["@lsp.type.comment"] = { link = "@comment" }, 18 | ["@lsp.type.enum"] = { link = "@type" }, 19 | ["@lsp.type.enumMember"] = { link = "@constant" }, 20 | ["@lsp.type.escapeSequence"] = { link = "@string.escape" }, 21 | ["@lsp.type.formatSpecifier"] = { link = "@punctuation.special" }, 22 | ["@lsp.type.interface"] = { fg = C.flamingo }, 23 | ["@lsp.type.keyword"] = { link = "@keyword" }, 24 | ["@lsp.type.namespace"] = { link = "@module" }, 25 | ["@lsp.type.number"] = { link = "@number" }, 26 | ["@lsp.type.operator"] = { link = "@operator" }, 27 | ["@lsp.type.parameter"] = { link = "@parameter" }, 28 | ["@lsp.type.property"] = { link = "@property" }, 29 | ["@lsp.type.selfKeyword"] = { link = "@variable.builtin" }, 30 | ["@lsp.type.typeAlias"] = { link = "@type.definition" }, 31 | ["@lsp.type.unresolvedReference"] = { link = "@error" }, 32 | ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables 33 | ["@lsp.typemod.class.defaultLibrary"] = { link = "@type.builtin" }, 34 | ["@lsp.typemod.enum.defaultLibrary"] = { link = "@type.builtin" }, 35 | ["@lsp.typemod.enumMember.defaultLibrary"] = { link = "@constant.builtin" }, 36 | ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" }, 37 | ["@lsp.typemod.keyword.async"] = { link = "@keyword.coroutine" }, 38 | ["@lsp.typemod.macro.defaultLibrary"] = { link = "@function.builtin" }, 39 | ["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" }, 40 | ["@lsp.typemod.operator.injected"] = { link = "@operator" }, 41 | ["@lsp.typemod.string.injected"] = { link = "@string" }, 42 | ["@lsp.typemod.type.defaultLibrary"] = { link = "@type.builtin" }, 43 | ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" }, 44 | ["@lsp.typemod.variable.injected"] = { link = "@variable" }, 45 | } 46 | end 47 | 48 | return M 49 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/signify.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | SignifySignAdd = { fg = C.green }, 6 | SignifySignChange = { fg = C.yellow }, 7 | SignifySignDelete = { fg = C.red }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/snacks.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | local indent_scope_color = O.integrations.snacks.indent_scope_color 5 | 6 | return { 7 | SnacksNormal = { link = "NormalFloat" }, 8 | SnacksWinBar = { link = "Title" }, 9 | SnacksBackdrop = { fg = C.overlay0 }, 10 | SnacksNormalNC = { link = "NormalFloat" }, 11 | SnacksWinBarNC = { link = "SnacksWinBar" }, 12 | 13 | SnacksNotifierInfo = { fg = C.blue }, 14 | SnacksNotifierIconInfo = { fg = C.blue }, 15 | SnacksNotifierTitleInfo = { fg = C.blue, style = { "italic" } }, 16 | SnacksNotifierFooterInfo = { link = "DiagnosticInfo" }, 17 | SnacksNotifierBorderInfo = { fg = C.blue }, 18 | SnacksNotifierWarn = { fg = C.yellow }, 19 | SnacksNotifierIconWarn = { fg = C.yellow }, 20 | SnacksNotifierTitleWarn = { fg = C.yellow, style = { "italic" } }, 21 | SnacksNotifierBorderWarn = { fg = C.yellow }, 22 | SnacksNotifierFooterWarn = { link = "DiagnosticWarn" }, 23 | SnacksNotifierDebug = { fg = C.peach }, 24 | SnacksNotifierIconDebug = { fg = C.peach }, 25 | SnacksNotifierTitleDebug = { fg = C.peach, style = { "italic" } }, 26 | SnacksNotifierBorderDebug = { fg = C.peach }, 27 | SnacksNotifierFooterDebug = { link = "DiagnosticHint" }, 28 | SnacksNotifierError = { fg = C.red }, 29 | SnacksNotifierIconError = { fg = C.red }, 30 | SnacksNotifierTitleError = { fg = C.red, style = { "italic" } }, 31 | SnacksNotifierBorderError = { fg = C.red }, 32 | SnacksNotifierFooterError = { link = "DiagnosticError" }, 33 | SnacksNotifierTrace = { fg = C.rosewater }, 34 | SnacksNotifierIconTrace = { fg = C.rosewater }, 35 | SnacksNotifierTitleTrace = { fg = C.rosewater, style = { "italic" } }, 36 | SnacksNotifierBorderTrace = { fg = C.rosewater }, 37 | SnacksNotifierFooterTrace = { link = "DiagnosticHint" }, 38 | 39 | SnacksDashboardNormal = { link = "Normal" }, 40 | SnacksDashboardDesc = { fg = C.blue }, 41 | SnacksDashboardFile = { fg = C.lavender }, 42 | SnacksDashboardDir = { link = "NonText" }, 43 | SnacksDashboardFooter = { fg = C.yellow, style = { "italic" } }, 44 | SnacksDashboardHeader = { fg = C.blue }, 45 | SnacksDashboardIcon = { fg = C.pink, bold = true }, 46 | SnacksDashboardKey = { fg = C.peach }, 47 | SnacksDashboardTerminal = { link = "SnacksDashboardNormal" }, 48 | SnacksDashboardSpecial = { link = "Special" }, 49 | SnacksDashboardTitle = { link = "Title" }, 50 | 51 | SnacksIndent = { fg = C.surface0 }, 52 | SnacksIndentScope = { fg = C[indent_scope_color] or C.text }, 53 | 54 | SnacksPicker = { link = "NormalFloat" }, 55 | SnacksPickerInputBorder = { link = "SnacksPickerBorder" }, 56 | 57 | SnacksPickerBorder = { link = "FloatBorder" }, 58 | SnacksPickerSelected = { 59 | fg = O.transparent_background and C.flamingo or C.text, 60 | bg = O.transparent_background and C.none or C.surface0, 61 | style = { "bold" }, 62 | }, 63 | SnacksPickerMatch = { fg = C.blue }, 64 | } 65 | end 66 | 67 | return M 68 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/symbols_outline.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | -- https://github.com/simrat39/symbols-outline.nvim 6 | FocusedSymbol = { fg = C.yellow, bg = C.none }, 7 | 8 | -- https://github.com/hedyhli/outline.nvim 9 | OutlineCurrent = { link = "FocusedSymbol" }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/telekasten.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | tkLink = { fg = C.blue }, 6 | tkBrackets = { fg = C.pink }, 7 | tkTag = { fg = C.sky }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/telescope.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | if O.integrations.telescope.style == "nvchad" then 5 | return { 6 | TelescopeBorder = { 7 | fg = O.transparent_background and C.blue or C.mantle, 8 | bg = O.transparent_background and C.none or C.mantle, 9 | }, 10 | TelescopeMatching = { fg = C.blue }, 11 | TelescopeNormal = { 12 | bg = O.transparent_background and C.none or C.mantle, 13 | }, 14 | TelescopePromptBorder = { 15 | fg = O.transparent_background and C.blue or C.surface0, 16 | bg = O.transparent_background and C.none or C.surface0, 17 | }, 18 | TelescopePromptNormal = { 19 | fg = C.text, 20 | bg = O.transparent_background and C.none or C.surface0, 21 | }, 22 | TelescopePromptPrefix = { 23 | fg = C.flamingo, 24 | bg = O.transparent_background and C.none or C.surface0, 25 | }, 26 | TelescopePreviewTitle = { 27 | fg = O.transparent_background and C.green or C.base, 28 | bg = O.transparent_background and C.none or C.green, 29 | }, 30 | TelescopePromptTitle = { 31 | fg = O.transparent_background and C.red or C.base, 32 | bg = O.transparent_background and C.none or C.red, 33 | }, 34 | TelescopeResultsTitle = { 35 | fg = O.transparent_background and C.lavender or C.mantle, 36 | bg = O.transparent_background and C.none or C.lavender, 37 | }, 38 | TelescopeSelection = { 39 | fg = O.transparent_background and C.flamingo or C.text, 40 | bg = O.transparent_background and C.none or C.surface0, 41 | style = { "bold" }, 42 | }, 43 | TelescopeSelectionCaret = { fg = C.flamingo }, 44 | } 45 | end 46 | 47 | return { 48 | -- TelescopeNormal = { link = "NormalFloat" }, -- Respect telescope's default float bg 49 | TelescopeBorder = { link = "FloatBorder" }, 50 | TelescopeSelectionCaret = { fg = C.flamingo }, 51 | TelescopeSelection = { 52 | fg = O.transparent_background and C.flamingo or C.text, 53 | bg = O.transparent_background and C.none or C.surface0, 54 | style = { "bold" }, 55 | }, 56 | TelescopeMatching = { fg = C.blue }, 57 | } 58 | end 59 | 60 | return M 61 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/treesitter_context.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return O.transparent_background 5 | and { 6 | TreesitterContextBottom = { sp = C.dim, style = { "underline" } }, 7 | TreesitterContextLineNumber = { fg = C.rosewater }, 8 | } 9 | or { 10 | TreesitterContextBottom = { 11 | sp = C.surface0, 12 | style = { "underline" }, 13 | }, 14 | TreesitterContextLineNumber = { 15 | fg = C.surface1, 16 | bg = C.mantle, 17 | }, 18 | } 19 | end 20 | 21 | return M 22 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/ts_rainbow.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | rainbowcol1 = { fg = C.red }, 6 | rainbowcol2 = { fg = C.teal }, 7 | rainbowcol3 = { fg = C.yellow }, 8 | rainbowcol4 = { fg = C.blue }, 9 | rainbowcol5 = { fg = C.pink }, 10 | rainbowcol6 = { fg = C.flamingo }, 11 | rainbowcol7 = { fg = C.green }, 12 | } 13 | end 14 | 15 | return M 16 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/ts_rainbow2.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | TSRainbowRed = { fg = C.red }, 6 | TSRainbowYellow = { fg = C.yellow }, 7 | TSRainbowBlue = { fg = C.blue }, 8 | TSRainbowOrange = { fg = C.peach }, 9 | TSRainbowGreen = { fg = C.green }, 10 | TSRainbowViolet = { fg = C.mauve }, 11 | TSRainbowCyan = { fg = C.teal }, 12 | } 13 | end 14 | 15 | return M 16 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/ufo.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.get = function() 4 | return { 5 | UfoFoldedFg = { fg = C.lavender }, 6 | UfoFoldedEllipsis = { fg = C.crust, bg = C.blue }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/vim_sneak.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | Sneak = { fg = C.overlay2, bg = C.pink }, 6 | SneakScope = { bg = C.text }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/vimwiki.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | VimwikiLink = { fg = C.sky, bg = C.none }, 6 | VimwikiHeaderChar = { fg = C.grey, bg = C.none }, 7 | VimwikiHR = { fg = C.yellow, bg = C.none }, 8 | VimwikiList = { fg = C.peach, bg = C.none }, 9 | VimwikiTag = { fg = C.peach, bg = C.none }, 10 | VimwikiMarkers = { fg = C.subtext0, bg = C.none }, 11 | VimwikiHeader1 = { fg = C.peach, bg = C.none, style = { "bold" } }, 12 | VimwikiHeader2 = { fg = C.green, bg = C.none, style = { "bold" } }, 13 | VimwikiHeader3 = { fg = C.blue, bg = C.none, style = { "bold" } }, 14 | VimwikiHeader4 = { fg = C.sky, bg = C.none, style = { "bold" } }, 15 | VimwikiHeader5 = { fg = C.yellow, bg = C.none, style = { "bold" } }, 16 | VimwikiHeader6 = { fg = C.mauve, bg = C.none, style = { "bold" } }, 17 | } 18 | end 19 | 20 | return M 21 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/which_key.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | WhichKey = { link = "NormalFloat" }, 6 | WhichKeyBorder = { link = "FloatBorder" }, 7 | 8 | WhichKeyGroup = { fg = C.blue }, 9 | WhichKeySeparator = { fg = C.overlay0 }, 10 | WhichKeyDesc = { fg = C.pink }, 11 | WhichKeyValue = { fg = C.overlay0 }, 12 | } 13 | end 14 | 15 | return M 16 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/integrations/window_picker.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | WindowPickerStatusLine = { fg = C.red, style = { "bold" } }, 6 | WindowPickerStatusLineNC = { fg = C.red, style = { "bold" } }, 7 | WindowPickerWinBar = { fg = C.red, style = { "bold" } }, 8 | WindowPickerWinBarNC = { fg = C.red, style = { "bold" } }, 9 | } 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/syntax.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | Comment = { fg = C.overlay2, style = O.styles.comments }, -- just comments 6 | SpecialComment = { link = "Special" }, -- special things inside a comment 7 | Constant = { fg = C.peach }, -- (preferred) any constant 8 | String = { fg = C.green, style = O.styles.strings or {} }, -- a string constant: "this is a string" 9 | Character = { fg = C.teal }, -- a character constant: 'c', '\n' 10 | Number = { fg = C.peach, style = O.styles.numbers or {} }, -- a number constant: 234, 0xff 11 | Float = { link = "Number" }, -- a floating point constant: 2.3e10 12 | Boolean = { fg = C.peach, style = O.styles.booleans or {} }, -- a boolean constant: TRUE, false 13 | Identifier = { fg = C.flamingo, style = O.styles.variables or {} }, -- (preferred) any variable name 14 | Function = { fg = C.blue, style = O.styles.functions or {} }, -- function name (also: methods for classes) 15 | Statement = { fg = C.mauve }, -- (preferred) any statement 16 | Conditional = { fg = C.mauve, style = O.styles.conditionals or {} }, -- if, then, else, endif, switch, etc. 17 | Repeat = { fg = C.mauve, style = O.styles.loops or {} }, -- for, do, while, etc. 18 | Label = { fg = C.sapphire }, -- case, default, etc. 19 | Operator = { fg = C.sky, style = O.styles.operators or {} }, -- "sizeof", "+", "*", etc. 20 | Keyword = { fg = C.mauve, style = O.styles.keywords or {} }, -- any other keyword 21 | Exception = { fg = C.mauve, style = O.styles.keywords or {} }, -- try, catch, throw 22 | 23 | PreProc = { fg = C.pink }, -- (preferred) generic Preprocessor 24 | Include = { fg = C.mauve, style = O.styles.keywords or {} }, -- preprocessor #include 25 | Define = { link = "PreProc" }, -- preprocessor #define 26 | Macro = { fg = C.mauve }, -- same as Define 27 | PreCondit = { link = "PreProc" }, -- preprocessor #if, #else, #endif, etc. 28 | 29 | StorageClass = { fg = C.yellow }, -- static, register, volatile, etc. 30 | Structure = { fg = C.yellow }, -- struct, union, enum, etc. 31 | Special = { fg = C.pink }, -- (preferred) any special symbol 32 | Type = { fg = C.yellow, style = O.styles.types or {} }, -- (preferred) int, long, char, etc. 33 | Typedef = { link = "Type" }, -- A typedef 34 | SpecialChar = { link = "Special" }, -- special character in a constant 35 | Tag = { fg = C.lavender, style = { "bold" } }, -- you can use CTRL-] on this 36 | Delimiter = { fg = C.overlay2 }, -- character that needs attention 37 | Debug = { link = "Special" }, -- debugging statements 38 | 39 | Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links 40 | Bold = { style = { "bold" } }, 41 | Italic = { style = { "italic" } }, 42 | -- ("Ignore", below, may be invisible...) 43 | -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| 44 | 45 | Error = { fg = C.red }, -- (preferred) any erroneous construct 46 | Todo = { bg = C.flamingo, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX 47 | qfLineNr = { fg = C.yellow }, 48 | qfFileName = { fg = C.blue }, 49 | htmlH1 = { fg = C.pink, style = { "bold" } }, 50 | htmlH2 = { fg = C.blue, style = { "bold" } }, 51 | -- mkdHeading = { fg = C.peach, style = { "bold" } }, 52 | -- mkdCode = { bg = C.terminal_black, fg = C.text }, 53 | mkdCodeDelimiter = { bg = C.base, fg = C.text }, 54 | mkdCodeStart = { fg = C.flamingo, style = { "bold" } }, 55 | mkdCodeEnd = { fg = C.flamingo, style = { "bold" } }, 56 | -- mkdLink = { fg = C.blue, style = { "underline" } }, 57 | 58 | -- debugging 59 | debugPC = { bg = O.transparent_background and C.none or C.crust }, -- used for highlighting the current line in terminal-debug 60 | debugBreakpoint = { bg = C.base, fg = C.overlay0 }, -- used for breakpoint colors in terminal-debug 61 | -- illuminate 62 | illuminatedWord = { bg = C.surface1 }, 63 | illuminatedCurWord = { bg = C.surface1 }, 64 | -- diff 65 | diffAdded = { fg = C.green }, 66 | diffRemoved = { fg = C.red }, 67 | diffChanged = { fg = C.blue }, 68 | diffOldFile = { fg = C.yellow }, 69 | diffNewFile = { fg = C.peach }, 70 | diffFile = { fg = C.blue }, 71 | diffLine = { fg = C.overlay0 }, 72 | diffIndexLine = { fg = C.teal }, 73 | DiffAdd = { bg = U.darken(C.green, 0.18, C.base) }, -- diff mode: Added line |diff.txt| 74 | DiffChange = { bg = U.darken(C.blue, 0.07, C.base) }, -- diff mode: Changed line |diff.txt| 75 | DiffDelete = { bg = U.darken(C.red, 0.18, C.base) }, -- diff mode: Deleted line |diff.txt| 76 | DiffText = { bg = U.darken(C.blue, 0.30, C.base) }, -- diff mode: Changed text within a changed line |diff.txt| 77 | -- NeoVim 78 | healthError = { fg = C.red }, 79 | healthSuccess = { fg = C.teal }, 80 | healthWarning = { fg = C.yellow }, 81 | -- misc 82 | 83 | -- glyphs 84 | GlyphPalette1 = { fg = C.red }, 85 | GlyphPalette2 = { fg = C.teal }, 86 | GlyphPalette3 = { fg = C.yellow }, 87 | GlyphPalette4 = { fg = C.blue }, 88 | GlyphPalette6 = { fg = C.teal }, 89 | GlyphPalette7 = { fg = C.text }, 90 | GlyphPalette9 = { fg = C.red }, 91 | 92 | -- rainbow 93 | rainbow1 = { fg = C.red }, 94 | rainbow2 = { fg = C.peach }, 95 | rainbow3 = { fg = C.yellow }, 96 | rainbow4 = { fg = C.green }, 97 | rainbow5 = { fg = C.sapphire }, 98 | rainbow6 = { fg = C.lavender }, 99 | 100 | -- csv 101 | csvCol0 = { fg = C.red }, 102 | csvCol1 = { fg = C.peach }, 103 | csvCol2 = { fg = C.yellow }, 104 | csvCol3 = { fg = C.green }, 105 | csvCol4 = { fg = C.sky }, 106 | csvCol5 = { fg = C.blue }, 107 | csvCol6 = { fg = C.lavender }, 108 | csvCol7 = { fg = C.mauve }, 109 | csvCol8 = { fg = C.pink }, 110 | } 111 | end 112 | 113 | return M 114 | -------------------------------------------------------------------------------- /lua/catppuccin/groups/terminal.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get() 4 | return { 5 | terminal_color_0 = C.overlay0, 6 | terminal_color_8 = C.overlay1, 7 | 8 | terminal_color_1 = C.red, 9 | terminal_color_9 = C.red, 10 | 11 | terminal_color_2 = C.green, 12 | terminal_color_10 = C.green, 13 | 14 | terminal_color_3 = C.yellow, 15 | terminal_color_11 = C.yellow, 16 | 17 | terminal_color_4 = C.blue, 18 | terminal_color_12 = C.blue, 19 | 20 | terminal_color_5 = C.pink, 21 | terminal_color_13 = C.pink, 22 | 23 | terminal_color_6 = C.sky, 24 | terminal_color_14 = C.sky, 25 | 26 | terminal_color_7 = C.text, 27 | terminal_color_15 = C.text, 28 | } 29 | end 30 | 31 | return M 32 | -------------------------------------------------------------------------------- /lua/catppuccin/init.lua: -------------------------------------------------------------------------------- 1 | local is_vim = vim.fn.has "nvim" ~= 1 2 | if is_vim then require "catppuccin.lib.vim" end 3 | 4 | ---@type Catppuccin 5 | local M = { 6 | default_options = { 7 | flavour = "auto", 8 | background = { 9 | light = "latte", 10 | dark = "mocha", 11 | }, 12 | compile_path = vim.fn.stdpath "cache" .. "/catppuccin", 13 | transparent_background = false, 14 | show_end_of_buffer = false, 15 | term_colors = false, 16 | kitty = vim.env.KITTY_WINDOW_ID and true or false, 17 | dim_inactive = { 18 | enabled = false, 19 | shade = "dark", 20 | percentage = 0.15, 21 | }, 22 | no_italic = false, 23 | no_bold = false, 24 | no_underline = false, 25 | styles = { 26 | comments = { "italic" }, 27 | conditionals = { "italic" }, 28 | loops = {}, 29 | functions = {}, 30 | keywords = {}, 31 | strings = {}, 32 | variables = {}, 33 | numbers = {}, 34 | booleans = {}, 35 | properties = {}, 36 | types = {}, 37 | operators = {}, 38 | }, 39 | default_integrations = true, 40 | integrations = { 41 | alpha = true, 42 | blink_cmp = true, 43 | fzf = true, 44 | cmp = true, 45 | dap = true, 46 | dap_ui = true, 47 | dashboard = true, 48 | diffview = false, 49 | flash = true, 50 | gitsigns = true, 51 | markdown = true, 52 | neogit = true, 53 | neotree = true, 54 | nvimtree = true, 55 | ufo = true, 56 | rainbow_delimiters = true, 57 | render_markdown = true, 58 | semantic_tokens = not is_vim, 59 | telescope = { enabled = true }, 60 | treesitter = not is_vim, 61 | treesitter_context = true, 62 | barbecue = { 63 | dim_dirname = true, 64 | bold_basename = true, 65 | dim_context = false, 66 | alt_background = false, 67 | }, 68 | illuminate = { 69 | enabled = true, 70 | lsp = false, 71 | }, 72 | indent_blankline = { 73 | enabled = true, 74 | scope_color = "", 75 | colored_indent_levels = false, 76 | }, 77 | native_lsp = { 78 | enabled = true, 79 | virtual_text = { 80 | errors = { "italic" }, 81 | hints = { "italic" }, 82 | warnings = { "italic" }, 83 | information = { "italic" }, 84 | ok = { "italic" }, 85 | }, 86 | underlines = { 87 | errors = { "underline" }, 88 | hints = { "underline" }, 89 | warnings = { "underline" }, 90 | information = { "underline" }, 91 | ok = { "underline" }, 92 | }, 93 | inlay_hints = { 94 | background = true, 95 | }, 96 | }, 97 | navic = { 98 | enabled = false, 99 | custom_bg = "NONE", 100 | }, 101 | dropbar = { 102 | enabled = true, 103 | color_mode = false, 104 | }, 105 | colorful_winsep = { 106 | enabled = false, 107 | color = "red", 108 | }, 109 | mini = { 110 | enabled = true, 111 | indentscope_color = "overlay2", 112 | }, 113 | }, 114 | color_overrides = {}, 115 | highlight_overrides = {}, 116 | }, 117 | flavours = { latte = 1, frappe = 2, macchiato = 3, mocha = 4 }, 118 | path_sep = jit and (jit.os == "Windows" and "\\" or "/") or package.config:sub(1, 1), 119 | } 120 | 121 | M.options = M.default_options 122 | 123 | function M.compile() 124 | local user_flavour = M.flavour 125 | for flavour, _ in pairs(M.flavours) do 126 | M.flavour = flavour 127 | require("catppuccin.lib." .. (is_vim and "vim." or "") .. "compiler").compile(flavour) 128 | end 129 | M.flavour = user_flavour -- Restore user flavour after compile 130 | end 131 | 132 | local function get_flavour(default) 133 | local flavour 134 | if default and default == M.flavour and vim.o.background ~= (M.flavour == "latte" and "light" or "dark") then 135 | flavour = M.options.background[vim.o.background] 136 | else 137 | flavour = default 138 | end 139 | 140 | if flavour and not M.flavours[flavour] then 141 | vim.notify( 142 | string.format( 143 | "Catppuccin (error): Invalid flavour '%s', flavour must be 'latte', 'frappe', 'macchiato', 'mocha' or 'auto'", 144 | flavour 145 | ), 146 | vim.log.levels.ERROR 147 | ) 148 | flavour = nil 149 | end 150 | return flavour or M.options.flavour or vim.g.catppuccin_flavour or M.options.background[vim.o.background] 151 | end 152 | 153 | local did_setup = false 154 | 155 | function M.load(flavour) 156 | if M.options.flavour == "auto" then -- set colorscheme based on o:background 157 | M.options.flavour = nil -- ensure that this will only run once on startup 158 | end 159 | if not did_setup then M.setup() end 160 | M.flavour = get_flavour(flavour) 161 | local compiled_path = M.options.compile_path .. M.path_sep .. M.flavour 162 | local f = loadfile(compiled_path) 163 | if not f then 164 | M.compile() 165 | f = assert(loadfile(compiled_path), "could not load cache") 166 | end 167 | f(flavour or M.options.flavour or vim.g.catppuccin_flavour) 168 | end 169 | 170 | ---@type fun(user_conf: CatppuccinOptions?) 171 | function M.setup(user_conf) 172 | did_setup = true 173 | -- Parsing user config 174 | user_conf = user_conf or {} 175 | 176 | if user_conf.default_integrations == false then 177 | M.default_options.integrations = vim.iter(pairs(M.default_options.integrations)) 178 | :fold({}, function(integrations, name, opts) 179 | if type(opts) == "table" then 180 | opts.enabled = false 181 | else 182 | opts = false 183 | end 184 | integrations[name] = opts 185 | return integrations 186 | end) 187 | end 188 | 189 | M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options) 190 | M.options.highlight_overrides.all = user_conf.custom_highlights or M.options.highlight_overrides.all 191 | 192 | -- Get cached hash 193 | local cached_path = M.options.compile_path .. M.path_sep .. "cached" 194 | local file = io.open(cached_path) 195 | local cached = nil 196 | if file then 197 | cached = file:read() 198 | file:close() 199 | end 200 | 201 | -- Get current hash 202 | local git_path = debug.getinfo(1).source:sub(2, -24) .. ".git" 203 | local git = vim.fn.getftime(git_path) -- 2x faster vim.loop.fs_stat 204 | local hash = require("catppuccin.lib.hashing").hash(user_conf) 205 | .. (git == -1 and git_path or git) -- no .git in /nix/store -> cache path 206 | .. (vim.o.winblend == 0 and 1 or 0) -- :h winblend 207 | .. (vim.o.pumblend == 0 and 1 or 0) -- :h pumblend 208 | 209 | -- Recompile if hash changed 210 | if cached ~= hash then 211 | M.compile() 212 | file = io.open(cached_path, "wb") 213 | if file then 214 | file:write(hash) 215 | file:close() 216 | end 217 | end 218 | end 219 | 220 | if is_vim then return M end 221 | 222 | vim.api.nvim_create_user_command( 223 | "Catppuccin", 224 | function(inp) vim.api.nvim_command("colorscheme catppuccin-" .. get_flavour(inp.args)) end, 225 | { 226 | nargs = 1, 227 | complete = function(line) 228 | return vim.tbl_filter(function(val) return vim.startswith(val, line) end, vim.tbl_keys(M.flavours)) 229 | end, 230 | } 231 | ) 232 | 233 | vim.api.nvim_create_user_command("CatppuccinCompile", function() 234 | for name, _ in pairs(package.loaded) do 235 | if name:match "^catppuccin." then package.loaded[name] = nil end 236 | end 237 | M.compile() 238 | vim.notify("Catppuccin (info): compiled cache!", vim.log.levels.INFO) 239 | vim.cmd.colorscheme "catppuccin" 240 | end, {}) 241 | 242 | if vim.g.catppuccin_debug then 243 | vim.api.nvim_create_autocmd("BufWritePost", { 244 | pattern = "*/catppuccin/*", 245 | callback = function() 246 | vim.schedule(function() vim.cmd "CatppuccinCompile" end) 247 | end, 248 | }) 249 | end 250 | 251 | return M 252 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/compiler.lua: -------------------------------------------------------------------------------- 1 | local path_sep = require("catppuccin").path_sep 2 | local O = require("catppuccin").options 3 | local M = {} 4 | 5 | -- Credit: https://github.com/EdenEast/nightfox.nvim 6 | local fmt = string.format 7 | 8 | local function inspect(t) 9 | local list = {} 10 | for k, v in pairs(t) do 11 | local tv = type(v) 12 | if tv == "string" then 13 | table.insert(list, fmt([[%s = "%s"]], k, v)) 14 | elseif tv == "table" then 15 | table.insert(list, fmt([[%s = %s]], k, inspect(v))) 16 | else 17 | table.insert(list, fmt([[%s = %s]], k, tostring(v))) 18 | end 19 | end 20 | return fmt([[{ %s }]], table.concat(list, ", ")) 21 | end 22 | 23 | function M.compile(flavour) 24 | local theme = require("catppuccin.lib.mapper").apply(flavour) 25 | local lines = { 26 | string.format( 27 | [[ 28 | return string.dump(function(flavour) 29 | vim.o.termguicolors = true 30 | if vim.g.colors_name then vim.cmd("hi clear") end 31 | if flavour then vim.o.background = "%s" end 32 | vim.g.colors_name = "catppuccin-%s" 33 | local h = vim.api.nvim_set_hl]], 34 | flavour == "latte" and "light" or "dark", 35 | flavour 36 | ), 37 | } 38 | if path_sep == "\\" then O.compile_path = O.compile_path:gsub("/", "\\") end 39 | 40 | local tbl = vim.tbl_deep_extend("keep", theme.custom_highlights, theme.integrations, theme.syntax, theme.editor) 41 | 42 | if O.term_colors == true then 43 | for k, v in pairs(theme.terminal) do 44 | table.insert(lines, fmt('vim.g.%s = "%s"', k, v)) 45 | end 46 | end 47 | 48 | for group, color in pairs(tbl) do 49 | if color.style then 50 | for _, style in pairs(color.style) do 51 | color[style] = true 52 | if O.no_italic and style == "italic" then color[style] = false end 53 | if O.no_bold and style == "bold" then color[style] = false end 54 | if O.no_underline and style == "underline" then color[style] = false end 55 | end 56 | end 57 | color.style = nil 58 | if color.link and (theme.custom_highlights[group] and not theme.custom_highlights[group].link) then 59 | color.link = nil 60 | end 61 | table.insert(lines, fmt([[h(0, "%s", %s)]], group, inspect(color))) 62 | end 63 | table.insert(lines, "end, true)") 64 | if vim.fn.isdirectory(O.compile_path) == 0 then vim.fn.mkdir(O.compile_path, "p") end 65 | 66 | if vim.g.catppuccin_debug then -- Debugging purpose 67 | local deb = io.open(O.compile_path .. path_sep .. flavour .. ".lua", "wb") 68 | if deb then 69 | deb:write(table.concat(lines, "\n")) 70 | deb:close() 71 | end 72 | end 73 | 74 | local f = loadstring(table.concat(lines, "\n")) 75 | if not f then 76 | local err_path = (path_sep == "/" and "/tmp" or os.getenv "TMP") .. "/catppuccin_error.lua" 77 | print(string.format( 78 | [[Catppuccin (error): Most likely some mistake made in your catppuccin config 79 | You can open %s for debugging 80 | 81 | If you think this is a bug, kindly open an issue and attach %s file 82 | Below is the error message that we captured: 83 | ]], 84 | err_path, 85 | err_path 86 | )) 87 | local err = io.open(err_path, "wb") 88 | if err then 89 | err:write(table.concat(lines, "\n")) 90 | err:close() 91 | end 92 | dofile(err_path) 93 | return 94 | end 95 | 96 | local file = assert( 97 | io.open(O.compile_path .. path_sep .. flavour, "wb"), 98 | "Permission denied while writing compiled file to " .. O.compile_path .. path_sep .. flavour 99 | ) 100 | file:write(f()) 101 | file:close() 102 | end 103 | 104 | return M 105 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/hashing.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | local B = bit or bit32 or require "catppuccin.lib.vim.bit" 3 | 4 | local hash_str = function(str) -- djb2, https://theartincode.stanis.me/008-djb2/ 5 | local hash = 5381 6 | for i = 1, #str do 7 | hash = B.lshift(hash, 5) + hash + string.byte(str, i) 8 | end 9 | return hash 10 | end 11 | 12 | function M.hash(v) -- Xor hashing: https://codeforces.com/blog/entry/85900 13 | local t = type(v) 14 | if t == "table" then 15 | local hash = 0 16 | for p, u in next, v do 17 | hash = B.bxor(hash, hash_str(p .. M.hash(u))) 18 | end 19 | return hash 20 | elseif t == "function" then 21 | return M.hash(v(require("catppuccin.palettes").get_palette())) 22 | end 23 | return tostring(v) 24 | end 25 | 26 | return M 27 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/highlighter.lua: -------------------------------------------------------------------------------- 1 | -- DEPRECATED MODULE 2 | local M = {} 3 | 4 | function M.highlight(group, color) 5 | if color.style then 6 | for _, style in ipairs(color.style) do 7 | color[style] = true 8 | end 9 | end 10 | color.style = nil 11 | vim.api.nvim_set_hl(0, group, color) 12 | end 13 | 14 | function M.syntax(tbl) 15 | for group, colors in pairs(tbl) do 16 | M.highlight(group, colors) 17 | end 18 | end 19 | 20 | return M 21 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/hsluv.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Lua implementation of HSLuv and HPLuv color spaces 3 | Homepage: http://www.hsluv.org/ 4 | 5 | Copyright (C) 2019 Alexei Boronine 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | associated documentation files (the "Software"), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 11 | following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial 14 | portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 17 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 18 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | ]] 22 | local hsluv = {} 23 | 24 | hsluv.hexChars = "0123456789abcdef" 25 | 26 | local distance_line_from_origin = function(line) return math.abs(line.intercept) / math.sqrt((line.slope ^ 2) + 1) end 27 | 28 | local length_of_ray_until_intersect = function(theta, line) 29 | return line.intercept / (math.sin(theta) - line.slope * math.cos(theta)) 30 | end 31 | 32 | hsluv.get_bounds = function(l) 33 | local result = {} 34 | local sub2 35 | local sub1 = ((l + 16) ^ 3) / 1560896 36 | if sub1 > hsluv.epsilon then 37 | sub2 = sub1 38 | else 39 | sub2 = l / hsluv.kappa 40 | end 41 | 42 | for i = 1, 3 do 43 | local m1 = hsluv.m[i][1] 44 | local m2 = hsluv.m[i][2] 45 | local m3 = hsluv.m[i][3] 46 | 47 | for t = 0, 1 do 48 | local top1 = (284517 * m1 - 94839 * m3) * sub2 49 | local top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * l * sub2 - 769860 * t * l 50 | local bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t 51 | table.insert(result, { slope = top1 / bottom, intercept = top2 / bottom }) 52 | end 53 | end 54 | return result 55 | end 56 | 57 | hsluv.max_safe_chroma_for_l = function(l) 58 | local bounds = hsluv.get_bounds(l) 59 | local min = 1.7976931348623157e+308 60 | 61 | for i = 1, 6 do 62 | local length = distance_line_from_origin(bounds[i]) 63 | if length >= 0 then min = math.min(min, length) end 64 | end 65 | return min 66 | end 67 | 68 | hsluv.max_safe_chroma_for_lh = function(l, h) 69 | local hrad = h / 360 * math.pi * 2 70 | local bounds = hsluv.get_bounds(l) 71 | local min = 1.7976931348623157e+308 72 | 73 | for i = 1, 6 do 74 | local bound = bounds[i] 75 | local length = length_of_ray_until_intersect(hrad, bound) 76 | if length >= 0 then min = math.min(min, length) end 77 | end 78 | return min 79 | end 80 | 81 | hsluv.dot_product = function(a, b) 82 | local sum = 0 83 | for i = 1, 3 do 84 | sum = sum + a[i] * b[i] 85 | end 86 | return sum 87 | end 88 | 89 | hsluv.from_linear = function(c) 90 | if c <= 0.0031308 then 91 | return 12.92 * c 92 | else 93 | return 1.055 * (c ^ 0.416666666666666685) - 0.055 94 | end 95 | end 96 | 97 | hsluv.to_linear = function(c) 98 | if c > 0.04045 then 99 | return ((c + 0.055) / 1.055) ^ 2.4 100 | else 101 | return c / 12.92 102 | end 103 | end 104 | 105 | hsluv.xyz_to_rgb = function(tuple) 106 | return { 107 | hsluv.from_linear(hsluv.dot_product(hsluv.m[1], tuple)), 108 | hsluv.from_linear(hsluv.dot_product(hsluv.m[2], tuple)), 109 | hsluv.from_linear(hsluv.dot_product(hsluv.m[3], tuple)), 110 | } 111 | end 112 | 113 | hsluv.rgb_to_xyz = function(tuple) 114 | local rgbl = { hsluv.to_linear(tuple[1]), hsluv.to_linear(tuple[2]), hsluv.to_linear(tuple[3]) } 115 | return { 116 | hsluv.dot_product(hsluv.minv[1], rgbl), 117 | hsluv.dot_product(hsluv.minv[2], rgbl), 118 | hsluv.dot_product(hsluv.minv[3], rgbl), 119 | } 120 | end 121 | 122 | hsluv.y_to_l = function(Y) 123 | if Y <= hsluv.epsilon then 124 | return Y / hsluv.refY * hsluv.kappa 125 | else 126 | return 116 * ((Y / hsluv.refY) ^ 0.333333333333333315) - 16 127 | end 128 | end 129 | 130 | hsluv.l_to_y = function(L) 131 | if L <= 8 then 132 | return hsluv.refY * L / hsluv.kappa 133 | else 134 | return hsluv.refY * (((L + 16) / 116) ^ 3) 135 | end 136 | end 137 | 138 | hsluv.xyz_to_luv = function(tuple) 139 | local X = tuple[1] 140 | local Y = tuple[2] 141 | local divider = X + 15 * Y + 3 * tuple[3] 142 | local varU = 4 * X 143 | local varV = 9 * Y 144 | if divider ~= 0 then 145 | varU = varU / divider 146 | varV = varV / divider 147 | else 148 | varU = 0 149 | varV = 0 150 | end 151 | local L = hsluv.y_to_l(Y) 152 | if L == 0 then return { 0, 0, 0 } end 153 | return { L, 13 * L * (varU - hsluv.refU), 13 * L * (varV - hsluv.refV) } 154 | end 155 | 156 | hsluv.luv_to_xyz = function(tuple) 157 | local L = tuple[1] 158 | local U = tuple[2] 159 | local V = tuple[3] 160 | if L == 0 then return { 0, 0, 0 } end 161 | local varU = U / (13 * L) + hsluv.refU 162 | local varV = V / (13 * L) + hsluv.refV 163 | local Y = hsluv.l_to_y(L) 164 | local X = 0 - (9 * Y * varU) / (((varU - 4) * varV) - varU * varV) 165 | return { X, Y, (9 * Y - 15 * varV * Y - varV * X) / (3 * varV) } 166 | end 167 | 168 | hsluv.luv_to_lch = function(tuple) 169 | local L = tuple[1] 170 | local U = tuple[2] 171 | local V = tuple[3] 172 | local C = math.sqrt(U * U + V * V) 173 | local H 174 | if C < 0.00000001 then 175 | H = 0 176 | else 177 | H = math.atan2(V, U) * 180.0 / 3.1415926535897932 178 | if H < 0 then H = 360 + H end 179 | end 180 | return { L, C, H } 181 | end 182 | 183 | hsluv.lch_to_luv = function(tuple) 184 | local L = tuple[1] 185 | local C = tuple[2] 186 | local Hrad = tuple[3] / 360.0 * 2 * math.pi 187 | return { L, math.cos(Hrad) * C, math.sin(Hrad) * C } 188 | end 189 | 190 | hsluv.hsluv_to_lch = function(tuple) 191 | local H = tuple[1] 192 | local S = tuple[2] 193 | local L = tuple[3] 194 | if L > 99.9999999 then return { 100, 0, H } end 195 | if L < 0.00000001 then return { 0, 0, H } end 196 | return { L, hsluv.max_safe_chroma_for_lh(L, H) / 100 * S, H } 197 | end 198 | 199 | hsluv.lch_to_hsluv = function(tuple) 200 | local L = tuple[1] 201 | local C = tuple[2] 202 | local H = tuple[3] 203 | local max_chroma = hsluv.max_safe_chroma_for_lh(L, H) 204 | if L > 99.9999999 then return { H, 0, 100 } end 205 | if L < 0.00000001 then return { H, 0, 0 } end 206 | 207 | return { H, C / max_chroma * 100, L } 208 | end 209 | 210 | hsluv.hpluv_to_lch = function(tuple) 211 | local H = tuple[1] 212 | local S = tuple[2] 213 | local L = tuple[3] 214 | if L > 99.9999999 then return { 100, 0, H } end 215 | if L < 0.00000001 then return { 0, 0, H } end 216 | return { L, hsluv.max_safe_chroma_for_l(L) / 100 * S, H } 217 | end 218 | 219 | hsluv.lch_to_hpluv = function(tuple) 220 | local L = tuple[1] 221 | local C = tuple[2] 222 | local H = tuple[3] 223 | if L > 99.9999999 then return { H, 0, 100 } end 224 | if L < 0.00000001 then return { H, 0, 0 } end 225 | return { H, C / hsluv.max_safe_chroma_for_l(L) * 100, L } 226 | end 227 | 228 | hsluv.rgb_to_hex = function(tuple) 229 | local h = "#" 230 | for i = 1, 3 do 231 | local c = math.floor(tuple[i] * 255 + 0.5) 232 | local digit2 = math.fmod(c, 16) 233 | local x = (c - digit2) / 16 234 | local digit1 = math.floor(x) 235 | h = h .. string.sub(hsluv.hexChars, digit1 + 1, digit1 + 1) 236 | h = h .. string.sub(hsluv.hexChars, digit2 + 1, digit2 + 1) 237 | end 238 | return h 239 | end 240 | 241 | hsluv.hex_to_rgb = function(hex) 242 | hex = string.lower(hex) 243 | local ret = {} 244 | for i = 0, 2 do 245 | local char1 = string.sub(hex, i * 2 + 2, i * 2 + 2) 246 | local char2 = string.sub(hex, i * 2 + 3, i * 2 + 3) 247 | local digit1 = string.find(hsluv.hexChars, char1) - 1 248 | local digit2 = string.find(hsluv.hexChars, char2) - 1 249 | ret[i + 1] = (digit1 * 16 + digit2) / 255.0 250 | end 251 | return ret 252 | end 253 | 254 | hsluv.lch_to_rgb = function(tuple) return hsluv.xyz_to_rgb(hsluv.luv_to_xyz(hsluv.lch_to_luv(tuple))) end 255 | 256 | hsluv.rgb_to_lch = function(tuple) return hsluv.luv_to_lch(hsluv.xyz_to_luv(hsluv.rgb_to_xyz(tuple))) end 257 | 258 | hsluv.hsluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hsluv_to_lch(tuple)) end 259 | 260 | hsluv.rgb_to_hsluv = function(tuple) return hsluv.lch_to_hsluv(hsluv.rgb_to_lch(tuple)) end 261 | 262 | hsluv.hpluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hpluv_to_lch(tuple)) end 263 | 264 | hsluv.rgb_to_hpluv = function(tuple) return hsluv.lch_to_hpluv(hsluv.rgb_to_lch(tuple)) end 265 | 266 | hsluv.hsluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hsluv_to_rgb(tuple)) end 267 | 268 | hsluv.hpluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hpluv_to_rgb(tuple)) end 269 | 270 | hsluv.hex_to_hsluv = function(s) return hsluv.rgb_to_hsluv(hsluv.hex_to_rgb(s)) end 271 | 272 | hsluv.hex_to_hpluv = function(s) return hsluv.rgb_to_hpluv(hsluv.hex_to_rgb(s)) end 273 | 274 | hsluv.m = { 275 | { 3.240969941904521, -1.537383177570093, -0.498610760293 }, 276 | { -0.96924363628087, 1.87596750150772, 0.041555057407175 }, 277 | { 0.055630079696993, -0.20397695888897, 1.056971514242878 }, 278 | } 279 | hsluv.minv = { 280 | { 0.41239079926595, 0.35758433938387, 0.18048078840183 }, 281 | { 0.21263900587151, 0.71516867876775, 0.072192315360733 }, 282 | { 0.019330818715591, 0.11919477979462, 0.95053215224966 }, 283 | } 284 | hsluv.refY = 1.0 285 | hsluv.refU = 0.19783000664283 286 | hsluv.refV = 0.46831999493879 287 | hsluv.kappa = 903.2962962 288 | hsluv.epsilon = 0.0088564516 289 | 290 | return hsluv 291 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/mapper.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.apply(flavour) 4 | flavour = flavour or require("catppuccin").flavour 5 | 6 | local _O, _C, _U = O, C, U -- Borrowing global var (setfenv doesn't work with require) 7 | O = require("catppuccin").options 8 | C = require("catppuccin.palettes").get_palette(flavour) 9 | U = require "catppuccin.utils.colors" 10 | 11 | C.none = "NONE" 12 | 13 | local dim_percentage = O.dim_inactive.percentage 14 | C.dim = O.dim_inactive.shade == "dark" 15 | and U.vary_color( 16 | { latte = U.darken(C.base, dim_percentage, C.mantle) }, 17 | U.darken(C.base, dim_percentage, C.mantle) 18 | ) 19 | or U.vary_color( 20 | { latte = U.lighten("#FBFCFD", dim_percentage, C.base) }, 21 | U.lighten(C.surface0, dim_percentage, C.base) 22 | ) 23 | 24 | local theme = {} 25 | theme.syntax = require("catppuccin.groups.syntax").get() 26 | theme.editor = require("catppuccin.groups.editor").get() 27 | local final_integrations = {} 28 | 29 | -- https://github.com/catppuccin/nvim/pull/624 30 | if type(O.integrations.dap) == "table" and O.integrations.dap.enable_ui ~= nil then 31 | O.integrations.dap_ui = O.integrations.dap.enable_ui 32 | O.integrations.dap.enable_ui = nil 33 | end 34 | 35 | for integration in pairs(O.integrations) do 36 | local cot = false 37 | if type(O.integrations[integration]) == "table" then 38 | if O.integrations[integration].enabled == true then cot = true end 39 | else 40 | if O.integrations[integration] == true then 41 | local default = require("catppuccin").default_options.integrations[integration] 42 | O.integrations[integration] = type(default) == "table" and default or {} 43 | O.integrations[integration].enabled = true 44 | cot = true 45 | end 46 | end 47 | 48 | if cot then 49 | final_integrations = vim.tbl_deep_extend( 50 | "force", 51 | final_integrations, 52 | require("catppuccin.groups.integrations." .. integration).get() 53 | ) 54 | end 55 | end 56 | 57 | theme.integrations = final_integrations -- plugins 58 | theme.terminal = require("catppuccin.groups.terminal").get() -- terminal colors 59 | local user_highlights = O.highlight_overrides 60 | if type(user_highlights[flavour]) == "function" then user_highlights[flavour] = user_highlights[flavour](C) end 61 | theme.custom_highlights = vim.tbl_deep_extend( 62 | "keep", 63 | user_highlights[flavour] or {}, 64 | type(user_highlights.all) == "function" and user_highlights.all(C) or user_highlights.all or {} 65 | ) 66 | 67 | O, C, U = _O, _C, _U -- Returning global var 68 | 69 | return theme 70 | end 71 | 72 | return M 73 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/vim/bit.lua: -------------------------------------------------------------------------------- 1 | -- Reference(stripped down): https://github.com/davidm/lua-bit-numberlua/blob/master/lmod/bit/numberlua.lua 2 | local M = {} 3 | 4 | local floor = math.floor 5 | 6 | local MOD = 2 ^ 32 7 | 8 | local function memoize(f) 9 | local mt = {} 10 | local t = setmetatable({}, mt) 11 | function mt:__index(k) 12 | local v = f(k) 13 | t[k] = v 14 | return v 15 | end 16 | 17 | return t 18 | end 19 | 20 | local function make_bitop_uncached(t, m) 21 | local function bitop(a, b) 22 | local res, p = 0, 1 23 | while a ~= 0 and b ~= 0 do 24 | local am, bm = a % m, b % m 25 | res = res + t[am][bm] * p 26 | a = (a - am) / m 27 | b = (b - bm) / m 28 | p = p * m 29 | end 30 | res = res + (a + b) * p 31 | return res 32 | end 33 | 34 | return bitop 35 | end 36 | 37 | local function make_bitop(t) 38 | local op1 = make_bitop_uncached(t, 2 ^ 1) 39 | local op2 = memoize(function(a) 40 | return memoize(function(b) return op1(a, b) end) 41 | end) 42 | return make_bitop_uncached(op2, 2 ^ (t.n or 1)) 43 | end 44 | 45 | M.bxor = make_bitop { [0] = { [0] = 0, [1] = 1 }, [1] = { [0] = 1, [1] = 0 }, n = 4 } 46 | local bxor = M.bxor 47 | 48 | local lshift, rshift 49 | 50 | lshift = function(a, disp) -- Lua5.2 inspired 51 | if disp < 0 then return rshift(a, -disp) end 52 | return (a * 2 ^ disp) % 2 ^ 32 53 | end 54 | 55 | rshift = function(a, disp) -- Lua5.2 inspired 56 | if disp < 0 then return lshift(a, -disp) end 57 | return floor(a % 2 ^ 32 / 2 ^ disp) 58 | end 59 | 60 | local function bit_tobit(x) 61 | x = x % MOD 62 | if x >= 0x80000000 then x = x - MOD end 63 | return x 64 | end 65 | 66 | local function bit_bxor(a, b, c, ...) 67 | if c then 68 | return bit_bxor(bit_bxor(a, b), c, ...) 69 | elseif b then 70 | return bit_tobit(bxor(a % MOD, b % MOD)) 71 | else 72 | return bit_tobit(a) 73 | end 74 | end 75 | 76 | return { 77 | bxor = bit_bxor, 78 | lshift = function(x, n) return bit_tobit(lshift(x % MOD, n % 32)) end, 79 | } 80 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/vim/compiler.lua: -------------------------------------------------------------------------------- 1 | local path_sep = require("catppuccin").path_sep 2 | local O = require("catppuccin").options 3 | local M = {} 4 | 5 | -- Reference: https://github.com/EdenEast/nightfox.nvim 6 | local fmt = string.format 7 | 8 | function M.compile(flavour) 9 | local theme = require("catppuccin.lib.mapper").apply(flavour) 10 | local lines = { 11 | string.format( 12 | [=[ 13 | return string.dump(function() 14 | vim.command[[ 15 | if exists("colors_name") 16 | hi clear 17 | endif 18 | set termguicolors 19 | set background=%s 20 | let g:colors_name = "catppuccin-%s"]=], 21 | (flavour == "latte" and "light" or "dark"), 22 | flavour 23 | ), 24 | } 25 | 26 | local tbl = vim.tbl_deep_extend("keep", theme.custom_highlights, theme.integrations, theme.syntax, theme.editor) 27 | 28 | if O.term_colors == true then 29 | for k, v in pairs(theme.terminal) do 30 | table.insert(lines, fmt("let g:%s = '%s'", k, v)) 31 | end 32 | end 33 | 34 | for group, color in pairs(tbl) do 35 | if color.link and (theme.custom_highlights[group] and not theme.custom_highlights[group].link) then 36 | color.link = nil 37 | end 38 | if color.link then 39 | table.insert(lines, fmt([[highlight! link %s %s]], group, color.link)) 40 | else 41 | if color.style then 42 | local rstyle = {} 43 | for _, style in pairs(color.style) do 44 | if O.no_italic and style == "italic" then style = nil end 45 | if O.no_bold and style == "bold" then style = nil end 46 | if O.no_underline and style == "underline" then style = nil end 47 | if style then rstyle[#rstyle + 1] = style end 48 | end 49 | color.style = table.concat(rstyle, ",") 50 | end 51 | if color.style == "" then color.style = nil end 52 | table.insert( 53 | lines, 54 | fmt( 55 | [[highlight %s guifg=%s guibg=%s gui=%s guisp=%s]], 56 | group, 57 | color.fg or "NONE", 58 | color.bg or "NONE", 59 | color.style or "NONE", 60 | color.sp or "NONE" 61 | ) 62 | ) 63 | end 64 | end 65 | table.insert(lines, "]]end, true)") 66 | if vim.fn.isdirectory(O.compile_path) == 0 then vim.fn.mkdir(O.compile_path, "p") end 67 | local ls = loadstring or load 68 | 69 | if vim.g.catppuccin_debug then -- Debugging purpose 70 | local deb = io.open(O.compile_path .. path_sep .. flavour .. ".lua", "wb") 71 | if deb then 72 | deb:write(table.concat(lines, "\n")) 73 | deb:close() 74 | end 75 | end 76 | 77 | local f = ls(table.concat(lines, "\n")) 78 | if not f then 79 | local err_path = (path_sep == "/" and "/tmp" or os.getenv "TMP") .. "/catppuccin_error.lua" 80 | print(string.format( 81 | [[Catppuccin (error): Most likely some mistake made in your catppuccin config 82 | You can open %s for debugging 83 | 84 | If you think this is a bug, kindly open an issue and attach %s file 85 | Below is the error message that we captured: 86 | ]], 87 | err_path, 88 | err_path 89 | )) 90 | local err = io.open(err_path, "wb") 91 | if err then 92 | err:write(table.concat(lines, "\n")) 93 | err:close() 94 | end 95 | dofile(err_path) 96 | return 97 | end 98 | 99 | local file = assert( 100 | io.open(O.compile_path .. path_sep .. flavour, "wb"), 101 | "Permission denied while writing compiled file to " .. O.compile_path .. path_sep .. flavour 102 | ) 103 | file:write(f()) 104 | file:close() 105 | end 106 | 107 | return M 108 | -------------------------------------------------------------------------------- /lua/catppuccin/lib/vim/init.lua: -------------------------------------------------------------------------------- 1 | -- TODO: private _G.vim 2 | vim.command [[command! CatppuccinCompile lua require('catppuccin').compile() print("Catppuccin (info): compiled cache!")]] 3 | 4 | vim.o = setmetatable({}, { 5 | __index = function(_, k) 6 | if k == "background" then return vim.eval "&background" end 7 | end, 8 | }) 9 | 10 | vim.fn.stdpath = function(what) 11 | if what ~= "cache" then return end 12 | if package.config:sub(1, 1) == "\\" then 13 | return vim.fn.expand "%localappdata%" .. [[Temp\vim]] 14 | else 15 | return (os.getenv "XDG_CACHE_HOME" or vim.fn.expand "$HOME/.cache") .. "/vim" 16 | end 17 | end 18 | 19 | vim.env = setmetatable({}, { 20 | __index = function(_, k) return os.getenv(k) end, 21 | }) 22 | 23 | -- Reference: https://github.com/neovim/neovim/blob/master/runtime/lua/vim/shared.lua 24 | local function tbl_isempty(t) 25 | assert(type(t) == "table", string.format("Expected table, got %s", type(t))) 26 | return next(t) == nil 27 | end 28 | 29 | local function tbl_islist(t) 30 | if type(t) ~= "table" then return false end 31 | 32 | local count = 0 33 | 34 | for k, _ in pairs(t) do 35 | if type(k) == "number" then 36 | count = count + 1 37 | else 38 | return false 39 | end 40 | end 41 | 42 | if count > 0 then 43 | return true 44 | else 45 | -- TODO(bfredl): in the future, we will always be inside nvim 46 | -- then this check can be deleted. 47 | if vim._empty_dict_mt == nil then return false end 48 | return getmetatable(t) ~= vim._empty_dict_mt 49 | end 50 | end 51 | 52 | local function can_merge(v) return type(v) == "table" and (tbl_isempty(v) or not tbl_islist(v)) end 53 | 54 | local function tbl_extend(behavior, deep_extend, ...) 55 | if behavior ~= "error" and behavior ~= "keep" and behavior ~= "force" then 56 | error('invalid "behavior": ' .. tostring(behavior)) 57 | end 58 | 59 | if select("#", ...) < 2 then 60 | error("wrong number of arguments (given " .. tostring(1 + select("#", ...)) .. ", expected at least 3)") 61 | end 62 | 63 | local ret = {} 64 | if vim._empty_dict_mt ~= nil and getmetatable(select(1, ...)) == vim._empty_dict_mt then ret = vim.empty_dict() end 65 | 66 | for i = 1, select("#", ...) do 67 | local tbl = select(i, ...) 68 | if tbl then 69 | for k, v in pairs(tbl) do 70 | if deep_extend and can_merge(v) and can_merge(ret[k]) then 71 | ret[k] = tbl_extend(behavior, true, ret[k], v) 72 | elseif behavior ~= "force" and ret[k] ~= nil then 73 | if behavior == "error" then error("key found in more than one map: " .. k) end -- Else behavior is "keep". 74 | else 75 | ret[k] = v 76 | end 77 | end 78 | end 79 | end 80 | return ret 81 | end 82 | 83 | function vim.tbl_deep_extend(behavior, ...) return tbl_extend(behavior, true, ...) end 84 | -------------------------------------------------------------------------------- /lua/catppuccin/palettes/frappe.lua: -------------------------------------------------------------------------------- 1 | return { 2 | rosewater = "#f2d5cf", 3 | flamingo = "#eebebe", 4 | pink = "#f4b8e4", 5 | mauve = "#ca9ee6", 6 | red = "#e78284", 7 | maroon = "#ea999c", 8 | peach = "#ef9f76", 9 | yellow = "#e5c890", 10 | green = "#a6d189", 11 | teal = "#81c8be", 12 | sky = "#99d1db", 13 | sapphire = "#85c1dc", 14 | blue = "#8caaee", 15 | lavender = "#babbf1", 16 | text = "#c6d0f5", 17 | subtext1 = "#b5bfe2", 18 | subtext0 = "#a5adce", 19 | overlay2 = "#949cbb", 20 | overlay1 = "#838ba7", 21 | overlay0 = "#737994", 22 | surface2 = "#626880", 23 | surface1 = "#51576d", 24 | surface0 = "#414559", 25 | base = "#303446", 26 | mantle = "#292c3c", 27 | crust = "#232634", 28 | } 29 | -------------------------------------------------------------------------------- /lua/catppuccin/palettes/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get_palette(flavour) 4 | local flvr = flavour or require("catppuccin").flavour or vim.g.catppuccin_flavour or "mocha" 5 | local _, palette = pcall(require, "catppuccin.palettes." .. flvr) 6 | local O = require("catppuccin").options 7 | local ans = vim.tbl_deep_extend("keep", O.color_overrides.all or {}, O.color_overrides[flvr] or {}, palette or {}) 8 | 9 | --[[ 10 | Kitty makes Neovim transparent if its own terminal background matches Neovim, 11 | so we need to adjust the color channels to make sure people don't suddenly 12 | have a transparent background if they haven't specified it. 13 | 14 | Unfortunately, this currently means all users on Kitty will have all their 15 | palette colors slightly offset. 16 | 17 | ref: https://github.com/kovidgoyal/kitty/issues/2917 18 | --]] 19 | if O.kitty then 20 | for accent, hex in pairs(ans) do 21 | local red_green_string = hex:sub(1, 5) 22 | local blue_value = tonumber(hex:sub(6, 7), 16) 23 | 24 | -- Slightly increase or decrease brightness of the blue channel 25 | blue_value = blue_value == 255 and blue_value - 1 or blue_value + 1 26 | ans[accent] = string.format("%s%.2x", red_green_string, blue_value) 27 | end 28 | end 29 | 30 | return ans 31 | end 32 | 33 | return M 34 | -------------------------------------------------------------------------------- /lua/catppuccin/palettes/latte.lua: -------------------------------------------------------------------------------- 1 | return { 2 | rosewater = "#dc8a78", 3 | flamingo = "#dd7878", 4 | pink = "#ea76cb", 5 | mauve = "#8839ef", 6 | red = "#d20f39", 7 | maroon = "#e64553", 8 | peach = "#fe640b", 9 | yellow = "#df8e1d", 10 | green = "#40a02b", 11 | teal = "#179299", 12 | sky = "#04a5e5", 13 | sapphire = "#209fb5", 14 | blue = "#1e66f5", 15 | lavender = "#7287fd", 16 | text = "#4c4f69", 17 | subtext1 = "#5c5f77", 18 | subtext0 = "#6c6f85", 19 | overlay2 = "#7c7f93", 20 | overlay1 = "#8c8fa1", 21 | overlay0 = "#9ca0b0", 22 | surface2 = "#acb0be", 23 | surface1 = "#bcc0cc", 24 | surface0 = "#ccd0da", 25 | base = "#eff1f5", 26 | mantle = "#e6e9ef", 27 | crust = "#dce0e8", 28 | } 29 | -------------------------------------------------------------------------------- /lua/catppuccin/palettes/macchiato.lua: -------------------------------------------------------------------------------- 1 | return { 2 | rosewater = "#f4dbd6", 3 | flamingo = "#f0c6c6", 4 | pink = "#f5bde6", 5 | mauve = "#c6a0f6", 6 | red = "#ed8796", 7 | maroon = "#ee99a0", 8 | peach = "#f5a97f", 9 | yellow = "#eed49f", 10 | green = "#a6da95", 11 | teal = "#8bd5ca", 12 | sky = "#91d7e3", 13 | sapphire = "#7dc4e4", 14 | blue = "#8aadf4", 15 | lavender = "#b7bdf8", 16 | text = "#cad3f5", 17 | subtext1 = "#b8c0e0", 18 | subtext0 = "#a5adcb", 19 | overlay2 = "#939ab7", 20 | overlay1 = "#8087a2", 21 | overlay0 = "#6e738d", 22 | surface2 = "#5b6078", 23 | surface1 = "#494d64", 24 | surface0 = "#363a4f", 25 | base = "#24273a", 26 | mantle = "#1e2030", 27 | crust = "#181926", 28 | } 29 | -------------------------------------------------------------------------------- /lua/catppuccin/palettes/mocha.lua: -------------------------------------------------------------------------------- 1 | return { 2 | rosewater = "#f5e0dc", 3 | flamingo = "#f2cdcd", 4 | pink = "#f5c2e7", 5 | mauve = "#cba6f7", 6 | red = "#f38ba8", 7 | maroon = "#eba0ac", 8 | peach = "#fab387", 9 | yellow = "#f9e2af", 10 | green = "#a6e3a1", 11 | teal = "#94e2d5", 12 | sky = "#89dceb", 13 | sapphire = "#74c7ec", 14 | blue = "#89b4fa", 15 | lavender = "#b4befe", 16 | text = "#cdd6f4", 17 | subtext1 = "#bac2de", 18 | subtext0 = "#a6adc8", 19 | overlay2 = "#9399b2", 20 | overlay1 = "#7f849c", 21 | overlay0 = "#6c7086", 22 | surface2 = "#585b70", 23 | surface1 = "#45475a", 24 | surface0 = "#313244", 25 | base = "#1e1e2e", 26 | mantle = "#181825", 27 | crust = "#11111b", 28 | } 29 | -------------------------------------------------------------------------------- /lua/catppuccin/types.lua: -------------------------------------------------------------------------------- 1 | ---@class Catppuccin 2 | ---@field options CatppuccinOptions 3 | ---@field setup fun(opts: CatppuccinOptions?) 4 | 5 | ---@alias CtpFlavor "mocha" | "macchiato" | "frappe" | "latte" | "auto" 6 | ---@alias CtpColor "rosewater" | "flamingo" | "pink" | "mauve" | "red" | "maroon" | "peach" | "yellow" | "green" | "teal" | "sky" | "sapphire" | "blue" | "lavender" | "text" | "subtext1" | "subtext0" | "overlay2" | "overlay1" | "overlay0" | "surface2" | "surface1" | "surface0" | "base" | "mantle" | "crust" 7 | ---@class CtpFlavors: {all: T, mocha: T, macchiato: T, frappe: T, latte: T } 8 | ---@class CtpColors: {rosewater: T, flamingo: T, pink: T, mauve: T, red: T, maroon: T, peach: T, yellow: T, green: T, teal: T, sky: T, sapphire: T, blue: T, lavender: T, text: T, subtext1: T, subtext0: T, overlay2: T, overlay1: T, overlay0: T, surface2: T, surface1: T, surface0: T, base: T, mantle: T, crust: T, none: T } 9 | 10 | ---@class CatppuccinOptions 11 | -- Changes the flavor based on the background. See `:h background` for more info. 12 | ---@field background CtpBackground? 13 | -- By default catppuccin writes the compiled results into the system's cache directory. 14 | -- You can change the cache dir by changing this value. 15 | ---@field compile_path string? 16 | -- Whether to enable transparency. 17 | ---@field transparent_background boolean? 18 | -- Toggle the `~` characters after the end of buffers. 19 | ---@field show_end_of_buffer boolean? 20 | -- If true, sets terminal colors (e.g. `g:terminal_color_0`). 21 | ---@field term_colors boolean? 22 | -- Workaround for kitty transparency issue: https://github.com/kovidgoyal/kitty/issues/2917 23 | ---@field kitty boolean? 24 | -- Settings for dimming of inactive windows. 25 | ---@field dim_inactive CtpDimInactive? 26 | -- Disables all italic styles. 27 | ---@field no_italic boolean? 28 | -- Disables all bold styles. 29 | ---@field no_bold boolean? 30 | -- Disables all underline styles. 31 | ---@field no_underline boolean? 32 | -- Handles the style of general hl groups (see `:h highlight-groups`). 33 | ---@field styles CtpStyles? 34 | -- Should default integrations be used. 35 | ---@field default_integrations boolean? 36 | -- Toggle integrations. Integrations allow Catppuccin to set the theme of various plugins. 37 | ---@field integrations CtpIntegrations? 38 | -- Catppuccin colors can be overwritten here. 39 | ---@field color_overrides CtpColors | CtpFlavors> | nil 40 | -- Catppuccin highlights can be overwritten here. 41 | ---@field highlight_overrides CtpHighlightOverrides? 42 | -- Global highlight overrides. 43 | ---@field custom_highlights CtpHighlightOverrideFn | {[string]: CtpHighlight} | nil 44 | -- The default flavor to use on startup. 45 | ---@field flavour CtpFlavor? 46 | 47 | ---@class CtpBackground 48 | -- Catppuccin flavor to use when `:set background=dark` is set. 49 | ---@field dark CtpFlavor? 50 | -- Catppuccin flavor to use when `:set background=light` is set. 51 | ---@field light CtpFlavor? 52 | 53 | ---@class CtpDimInactive 54 | -- Whether to dim inactive windows. 55 | ---@field enabled boolean 56 | -- Whether to darken or lighten inactive windows. 57 | ---@field shade "dark" | "light" | nil 58 | -- Percentage of the shade to apply to the inactive window 59 | ---@field percentage number? 60 | 61 | ---@class CtpStyles 62 | -- Change the style of comments. 63 | ---@field comments CtpHighlightArgs[]? 64 | -- Change the style of conditionals. 65 | ---@field conditionals CtpHighlightArgs[]? 66 | -- Change the style of loops. 67 | ---@field loops CtpHighlightArgs[]? 68 | -- Change the style of functions. 69 | ---@field functions CtpHighlightArgs[]? 70 | -- Change the style of keywords. 71 | ---@field keywords CtpHighlightArgs[]? 72 | -- Change the style of strings. 73 | ---@field strings CtpHighlightArgs[]? 74 | -- Change the style of variables. 75 | ---@field variables CtpHighlightArgs[]? 76 | -- Change the style of numbers. 77 | ---@field numbers CtpHighlightArgs[]? 78 | -- Change the style of booleans. 79 | ---@field booleans CtpHighlightArgs[]? 80 | -- Change the style of properties. 81 | ---@field properties CtpHighlightArgs[]? 82 | -- Change the style of types. 83 | ---@field types CtpHighlightArgs[]? 84 | -- Change the style of operators. 85 | ---@field operators CtpHighlightArgs[]? 86 | -- Change the style of miscs. 87 | ---@field miscs CtpHighlightArgs[]? 88 | 89 | ---@class CtpNativeLspStyles 90 | -- Change the style of LSP error diagnostics. 91 | ---@field errors CtpHighlightArgs[]? 92 | -- Change the style of LSP hint diagnostics. 93 | ---@field hints CtpHighlightArgs[]? 94 | -- Change the style of LSP warning diagnostics. 95 | ---@field warnings CtpHighlightArgs[]? 96 | -- Change the style of LSP information diagnostics. 97 | ---@field information CtpHighlightArgs[]? 98 | -- Change the style of LSP ok diagnostics. 99 | ---@field ok CtpHighlightArgs[]? 100 | 101 | ---@class CtpNativeLspInlayHints 102 | -- Toggle the background of inlay hints. 103 | ---@field background boolean? 104 | 105 | ---@class CtpIntegrations 106 | ---@field aerial boolean? 107 | ---@field alpha boolean? 108 | ---@field avante CtpIntegratinAvant | boolean? 109 | ---@field barbar boolean? 110 | -- Use this to set it up: 111 | -- 112 | -- ```lua 113 | -- require("barbecue").setup { 114 | -- -- valid options: 115 | -- -- "catppuccin-latte" 116 | -- -- "catppuccin-frappe" 117 | -- -- "catppuccin-macchiato" 118 | -- -- "catppuccin-mocha" 119 | -- theme = "catppuccin", 120 | -- } 121 | ---``` 122 | ---@field barbecue CtpIntegrationBarbecue | boolean? 123 | ---@field beacon boolean? 124 | ---@field blink_cmp boolean? 125 | ---@field cmp boolean? 126 | -- `coc.nvim` links to `native_lsp` highlight groups, so you can use 127 | -- `native_lsp.virtual_text` and `native_lsp.underlines` to style diagnostics. 128 | ---@field coc_nvim boolean? 129 | ---@field colorful_winsep CtpIntegrationColorfulWinsep | boolean? 130 | ---@field copilot_vim boolean? 131 | -- ```lua 132 | -- local sign = vim.fn.sign_define 133 | -- 134 | -- sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""}) 135 | -- sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""}) 136 | -- sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""}) 137 | -- ``` 138 | ---@field dadbod_ui boolean? 139 | ---@field dap boolean? 140 | ---@field dap_ui boolean? 141 | ---@field dashboard boolean? 142 | ---@field diffview boolean? 143 | ---@field dropbar CtpIntegrationDropbar | boolean? 144 | ---@field fern boolean? 145 | -- Set `notification.window.winblend` to `0` in your `fidget` config: 146 | -- 147 | -- ```lua 148 | -- require("fidget").setup { 149 | -- notification = { 150 | -- window = { winblend = 0 }, 151 | -- } 152 | -- } 153 | -- ``` 154 | ---@field fidget boolean? 155 | ---@field flash boolean? 156 | ---@field fzf boolean? 157 | ---@field gitgutter boolean? 158 | ---@field gitgraph boolean? 159 | ---@field gitsigns CtpIntegrationGitsigns | boolean? 160 | ---@field grug_far boolean? 161 | ---@field harpoon boolean? 162 | ---@field headlines boolean? 163 | ---@field hop boolean? 164 | ---@field illuminate CtpIntegrationIlluminate | boolean? 165 | ---@field indent_blankline CtpIntegrationIndentBlankline | boolean? 166 | ---@field leap boolean? 167 | ---@field lightspeed boolean? 168 | ---@field lir CtpIntegrationLir | boolean? 169 | -- For custom Lsp kind icon and colors, adjust your `lspsaga` config: 170 | -- 171 | -- ```lua 172 | -- require("lspsaga").setup { 173 | -- ui = { 174 | -- kind = require("catppuccin.groups.integrations.lsp_saga").custom_kind(), 175 | -- }, 176 | -- } 177 | -- ``` 178 | ---@field lsp_saga boolean? 179 | ---@field lsp_trouble boolean? 180 | ---@field markdown boolean? 181 | ---@field markview boolean? 182 | ---@field mason boolean? 183 | ---@field native_lsp CtpIntegrationNativeLsp | boolean? 184 | -- You **NEED** to enable highlight in your `nvim-navic` config or it won't work: 185 | -- 186 | -- ```lua 187 | -- require("nvim-navic").setup { 188 | -- highlight = true 189 | -- } 190 | -- ``` 191 | ---@field navic CtpIntegrationNavic | boolean? 192 | ---@field neogit boolean? 193 | ---@field neotest boolean? 194 | ---@field neotree boolean? 195 | ---@field noice boolean? 196 | ---@field notify boolean? 197 | ---@field nvim_surround boolean? 198 | ---@field nvimtree boolean? 199 | ---@field octo boolean? 200 | ---@field overseer boolean? 201 | ---@field pounce boolean? 202 | ---@field rainbow_delimiters boolean? 203 | ---@field render_markdown boolean? 204 | ---@field sandwich boolean? 205 | ---@field semantic_tokens boolean? 206 | ---@field snacks CtpIntegrationSnacks | boolean? 207 | ---@field signify boolean? 208 | ---@field symbols_outline boolean? 209 | ---@field telekasten boolean? 210 | ---@field telescope CtpIntegrationTelescope | boolean? 211 | ---@field treesitter boolean? 212 | ---@field treesitter_context boolean? 213 | ---@field ts_rainbow boolean? 214 | ---@field ts_rainbow2 boolean? 215 | ---@field vim_sneak boolean? 216 | ---@field vimwiki boolean? 217 | ---@field which_key boolean? 218 | ---@field window_picker boolean? 219 | 220 | ---@class CtpIntegratinAvant 221 | -- Whether the opts.windows.sidebar_header.rounded option is set on Avante 222 | ---@field enabled boolean 223 | ---@field windows_sidebar_header_rounded boolean? 224 | 225 | ---@class CtpIntegrationBarbecue 226 | -- Whether to use the alternative background. 227 | ---@field alt_background boolean? 228 | -- Whether the basename should be bold. 229 | ---@field bold_basename boolean? 230 | -- Whether the context should be dimmed. 231 | ---@field dim_context boolean? 232 | -- Whether the directory name should be dimmed. 233 | ---@field dim_dirname boolean? 234 | 235 | ---@class CtpIntegrationColorfulWinsep 236 | -- Whether to enable the colorful-winsep integration. 237 | ---@field enabled boolean 238 | -- Set to a Catppuccin color name to use for the split separator. 239 | ---@field color CtpColor? 240 | 241 | ---@class CtpIntegrationDropbar 242 | -- Whether to enable the dropbar integration. 243 | ---@field enabled boolean 244 | -- Set to true to apply color to the text in dropbar, false to only apply it to the icons. 245 | ---@field color_mode boolean? 246 | 247 | ---@class CtpIntegrationGitsigns 248 | --- Whether to enable the gitsigns integration 249 | ---@field enabled boolean 250 | --- Whether to enabled transparent background option 251 | ---@field transparent boolean? 252 | 253 | ---@class CtpIntegrationIndentBlankline 254 | -- Whether to enable the integration. 255 | ---@field enabled boolean 256 | -- Sets the color of the scope line 257 | ---@field scope_color CtpColor? 258 | -- Enables char highlights per indent level. 259 | -- Follow the instructions on the plugins GitHub repo to set it up. 260 | ---@field colored_indent_levels boolean? 261 | 262 | ---@class CtpIntegrationLir 263 | -- Whether to enable the integration. 264 | ---@field enabled boolean 265 | -- Sets lir-git-status.nvim highlight groups 266 | ---@field git_status boolean 267 | 268 | ---@class CtpIntegrationMini 269 | -- Whether to enable the integration. 270 | ---@field enabled boolean 271 | -- Sets the color of the scope line 272 | ---@field indentscope_color CtpColor? 273 | 274 | ---@class CtpIntegrationNativeLsp 275 | -- Whether to enable the Native LSP integration. 276 | ---@field enabled boolean 277 | -- Styles to apply to virtual text. 278 | ---@field virtual_text CtpNativeLspStyles? 279 | -- Styles to apply to underlines. 280 | ---@field underlines CtpNativeLspStyles? 281 | -- Inlay hints options. 282 | ---@field inlay_hints CtpNativeLspInlayHints? 283 | 284 | ---@class CtpIntegrationNavic 285 | -- Whether to enable the navic integration. 286 | ---@field enabled boolean 287 | -- Override the background color for navic. 288 | ---@field custom_bg CtpColor | "NONE" | "lualine" | nil 289 | 290 | ---@class CtpIntegrationSnacks 291 | -- Whether to enable the snacks integration. 292 | ---@field enabled boolean 293 | -- Sets the color of the indent scope line 294 | ---@field indent_scope_color CtpColor? 295 | 296 | ---@class CtpIntegrationTelescope 297 | -- Whether to enable the telescope integration 298 | ---@field enabled boolean? 299 | -- The style of Telescope 300 | ---@field style "classic" | "nvchad" | nil 301 | 302 | ---@class CtpIntegrationIlluminate 303 | -- Whether to enable the vim-illuminate integration 304 | ---@field enabled boolean? 305 | -- Whether to standout IlluminatedWordWrite hl group 306 | ---@field lsp boolean? 307 | 308 | ---@alias CtpHighlightArgs "bold" | "underline" | "undercurl" | "underdouble" | "underdotted" | "underdashed" | "strikethrough" | "reverse" | "inverse" | "italic" | "standout" | "altfont" | "nocombine" | "NONE" 309 | ---@alias CtpHighlightOverrideFn fun(colors: CtpColors): { [string]: CtpHighlight} 310 | ---@alias CtpHighlightOverrides CtpFlavors 311 | 312 | ---@class CtpHighlight 313 | ---@field fg string? 314 | ---@field bg string? 315 | ---@field style CtpHighlightArgs[]? 316 | ---@field link string? 317 | -------------------------------------------------------------------------------- /lua/catppuccin/utils/barbecue.lua: -------------------------------------------------------------------------------- 1 | return function(flavour) 2 | local C = require("catppuccin.palettes").get_palette(flavour) 3 | local O = require("catppuccin").options 4 | 5 | local transparent_bg = O.transparent_background and C.none or C.mantle 6 | 7 | local dirname_color = O.integrations.barbecue.dim_dirname and C.overlay1 or C.text 8 | local basename_bold = O.integrations.barbecue.bold_basename 9 | local context_color = O.integrations.barbecue.dim_context and C.overlay1 or C.text 10 | local background_color = O.integrations.barbecue.alt_background and transparent_bg or C.none 11 | 12 | local M = { 13 | normal = { fg = C.text, bg = background_color }, 14 | 15 | ellipsis = { fg = C.overlay1 }, 16 | separator = { fg = C.overlay1 }, 17 | modified = { fg = C.peach }, 18 | 19 | dirname = { fg = dirname_color }, 20 | basename = { fg = C.text, bold = basename_bold }, 21 | context = { fg = context_color }, 22 | 23 | -- Same keys as navic 24 | context_file = { fg = C.blue }, 25 | context_module = { fg = C.blue }, 26 | context_namespace = { fg = C.blue }, 27 | context_package = { fg = C.blue }, 28 | context_class = { fg = C.yellow }, 29 | context_method = { fg = C.blue }, 30 | context_property = { fg = C.green }, 31 | context_field = { fg = C.green }, 32 | context_constructor = { fg = C.blue }, 33 | context_enum = { fg = C.green }, 34 | context_interface = { fg = C.yellow }, 35 | context_function = { fg = C.blue }, 36 | context_variable = { fg = C.flamingo }, 37 | context_constant = { fg = C.peach }, 38 | context_string = { fg = C.green }, 39 | context_number = { fg = C.peach }, 40 | context_boolean = { fg = C.peach }, 41 | context_array = { fg = C.blue }, 42 | context_object = { fg = C.blue }, 43 | context_key = { fg = C.flamingo }, 44 | context_null = { fg = C.peach }, 45 | context_enum_member = { fg = C.red }, 46 | context_struct = { fg = C.blue }, 47 | context_event = { fg = C.blue }, 48 | context_operator = { fg = C.blue }, 49 | context_type_parameter = { fg = C.blue }, 50 | } 51 | 52 | return M 53 | end 54 | -------------------------------------------------------------------------------- /lua/catppuccin/utils/colors.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local hsluv = require "catppuccin.lib.hsluv" 4 | 5 | M.bg = "#000000" 6 | M.fg = "#ffffff" 7 | M.day_brightness = 0.3 8 | 9 | ---@param hex_str string hexadecimal value of a color 10 | local hex_to_rgb = function(hex_str) 11 | local hex = "[abcdef0-9][abcdef0-9]" 12 | local pat = "^#(" .. hex .. ")(" .. hex .. ")(" .. hex .. ")$" 13 | hex_str = string.lower(hex_str) 14 | 15 | assert(string.find(hex_str, pat) ~= nil, "hex_to_rgb: invalid hex_str: " .. tostring(hex_str)) 16 | 17 | local red, green, blue = string.match(hex_str, pat) 18 | return { tonumber(red, 16), tonumber(green, 16), tonumber(blue, 16) } 19 | end 20 | 21 | ---@param fg string forecrust color 22 | ---@param bg string background color 23 | ---@param alpha number number between 0 and 1. 0 results in bg, 1 results in fg 24 | function M.blend(fg, bg, alpha) 25 | bg = hex_to_rgb(bg) 26 | fg = hex_to_rgb(fg) 27 | 28 | local blendChannel = function(i) 29 | local ret = (alpha * fg[i] + ((1 - alpha) * bg[i])) 30 | return math.floor(math.min(math.max(0, ret), 255) + 0.5) 31 | end 32 | 33 | return string.format("#%02X%02X%02X", blendChannel(1), blendChannel(2), blendChannel(3)) 34 | end 35 | 36 | function M.darken(hex, amount, bg) return M.blend(hex, bg or M.bg, math.abs(amount)) end 37 | 38 | function M.lighten(hex, amount, fg) return M.blend(hex, fg or M.fg, math.abs(amount)) end 39 | 40 | function M.brighten(color, percentage) 41 | local hsl = hsluv.hex_to_hsluv(color) 42 | local larpSpace = 100 - hsl[3] 43 | if percentage < 0 then larpSpace = hsl[3] end 44 | hsl[3] = hsl[3] + larpSpace * percentage 45 | return hsluv.hsluv_to_hex(hsl) 46 | end 47 | 48 | function M.invertColor(color) 49 | if color ~= "NONE" then 50 | local hsl = hsluv.hex_to_hsluv(color) 51 | hsl[3] = 100 - hsl[3] 52 | if hsl[3] < 40 then hsl[3] = hsl[3] + (100 - hsl[3]) * M.day_brightness end 53 | return hsluv.hsluv_to_hex(hsl) 54 | end 55 | return color 56 | end 57 | 58 | function M.string_to_color(colors, value, default) 59 | if not value or value == "" then return default end 60 | 61 | -- If the value is a hex color code then return it 62 | local hex = "[abcdef0-9][abcdef0-9]" 63 | local pat = "^#" .. hex .. hex .. hex .. "$" 64 | if string.match(value, pat) then return value end 65 | 66 | local acceptable_colors = { "black", "red", "green", "blue", "magenta", "cyan", "text", "orange", "pink" } 67 | for _, ac in ipairs(acceptable_colors) do 68 | if string.match(value, ac) then return colors[value] end 69 | end 70 | 71 | -- Did not match anything to return default 72 | return default 73 | end 74 | 75 | function M.color_is_bright(r, g, b) 76 | -- Counting the perceptive luminance - human eye favors green color 77 | local luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255 78 | if luminance > 0.5 then 79 | return true -- Bright colors, black font 80 | else 81 | return false -- Dark colors, text font 82 | end 83 | end 84 | 85 | function M.hex2rgb(hex) 86 | return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6)) 87 | end 88 | 89 | function M.assert_brightness(color) 90 | local hex = color:gsub("#", "") 91 | local r = M.hex2rgb(string.sub(hex, 1, 2)) 92 | local g = M.hex2rgb(string.sub(hex, 3, 4)) 93 | local b = M.hex2rgb(string.sub(hex, 5, 6)) 94 | 95 | if M.color_is_bright(tonumber(r), tonumber(g), tonumber(b)) == true then 96 | return true -- bright 97 | end 98 | 99 | return false -- dull 100 | end 101 | 102 | function M.vary_color(palettes, default) 103 | local flvr = require("catppuccin").flavour 104 | 105 | if palettes[flvr] ~= nil then return palettes[flvr] end 106 | return default 107 | end 108 | 109 | local function rgb2Hex(rgb) 110 | local hexadecimal = "#" 111 | 112 | for _, value in pairs(rgb) do 113 | local hex = "" 114 | 115 | while value > 0 do 116 | local index = math.fmod(value, 16) + 1 117 | value = math.floor(value / 16) 118 | hex = string.sub(hsluv.hexChars, index, index) .. hex 119 | end 120 | 121 | if string.len(hex) == 0 then 122 | hex = "00" 123 | elseif string.len(hex) == 1 then 124 | hex = "0" .. hex 125 | end 126 | 127 | hexadecimal = hexadecimal .. hex 128 | end 129 | 130 | return hexadecimal 131 | end 132 | 133 | function M.increase_saturation(hex, percentage) 134 | local rgb = hex_to_rgb(hex) 135 | 136 | local saturation_float = percentage 137 | 138 | table.sort(rgb) 139 | local rgb_intensity = { 140 | min = rgb[1] / 255, 141 | mid = rgb[2] / 255, 142 | max = rgb[3] / 255, 143 | } 144 | 145 | if rgb_intensity.max == rgb_intensity.min then 146 | -- all colors have same intensity, which means 147 | -- the original color is gray, so we can't change saturation. 148 | return hex 149 | end 150 | 151 | local new_intensities = {} 152 | new_intensities.max = rgb_intensity.max 153 | new_intensities.min = rgb_intensity.max * (1 - saturation_float) 154 | 155 | if rgb_intensity.mid == rgb_intensity.min then 156 | new_intensities.mid = new_intensities.min 157 | else 158 | local intensity_proportion = (rgb_intensity.max - rgb_intensity.mid) / (rgb_intensity.mid - rgb_intensity.min) 159 | new_intensities.mid = (intensity_proportion * new_intensities.min + rgb_intensity.max) 160 | / (intensity_proportion + 1) 161 | end 162 | 163 | for i, v in pairs(new_intensities) do 164 | new_intensities[i] = math.floor(v * 255) 165 | end 166 | table.sort(new_intensities) 167 | return (rgb2Hex { new_intensities.max, new_intensities.min, new_intensities.mid }) 168 | end 169 | 170 | return M 171 | -------------------------------------------------------------------------------- /lua/catppuccin/utils/lualine.lua: -------------------------------------------------------------------------------- 1 | return function(flavour) 2 | local C = require("catppuccin.palettes").get_palette(flavour) 3 | local O = require("catppuccin").options 4 | local catppuccin = {} 5 | 6 | local transparent_bg = O.transparent_background and "NONE" or C.mantle 7 | 8 | catppuccin.normal = { 9 | a = { bg = C.blue, fg = C.mantle, gui = "bold" }, 10 | b = { bg = C.surface0, fg = C.blue }, 11 | c = { bg = transparent_bg, fg = C.text }, 12 | } 13 | 14 | catppuccin.insert = { 15 | a = { bg = C.green, fg = C.base, gui = "bold" }, 16 | b = { bg = C.surface0, fg = C.green }, 17 | } 18 | 19 | catppuccin.terminal = { 20 | a = { bg = C.green, fg = C.base, gui = "bold" }, 21 | b = { bg = C.surface0, fg = C.green }, 22 | } 23 | 24 | catppuccin.command = { 25 | a = { bg = C.peach, fg = C.base, gui = "bold" }, 26 | b = { bg = C.surface0, fg = C.peach }, 27 | } 28 | 29 | catppuccin.visual = { 30 | a = { bg = C.mauve, fg = C.base, gui = "bold" }, 31 | b = { bg = C.surface0, fg = C.mauve }, 32 | } 33 | 34 | catppuccin.replace = { 35 | a = { bg = C.red, fg = C.base, gui = "bold" }, 36 | b = { bg = C.surface0, fg = C.red }, 37 | } 38 | 39 | catppuccin.inactive = { 40 | a = { bg = transparent_bg, fg = C.blue }, 41 | b = { bg = transparent_bg, fg = C.surface1, gui = "bold" }, 42 | c = { bg = transparent_bg, fg = C.overlay0 }, 43 | } 44 | 45 | return catppuccin 46 | end 47 | -------------------------------------------------------------------------------- /lua/catppuccin/utils/reactive.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.cursor(name, palette) 4 | return { 5 | name = name, 6 | init = function() vim.opt.guicursor:append "a:ReactiveCursor" end, 7 | modes = { 8 | n = { 9 | hl = { 10 | ReactiveCursor = { bg = palette.yellow }, 11 | }, 12 | }, 13 | i = { 14 | hl = { 15 | ReactiveCursor = { bg = palette.teal }, 16 | }, 17 | }, 18 | no = { 19 | operators = { 20 | d = { 21 | hl = { 22 | ReactiveCursor = { bg = palette.red }, 23 | }, 24 | }, 25 | y = { 26 | hl = { 27 | ReactiveCursor = { bg = palette.peach }, 28 | }, 29 | }, 30 | c = { 31 | hl = { 32 | ReactiveCursor = { bg = palette.blue }, 33 | }, 34 | }, 35 | }, 36 | }, 37 | R = { 38 | hl = { 39 | ReactiveCursor = { bg = palette.sapphire }, 40 | }, 41 | }, 42 | -- visual 43 | [{ "v", "V", "\x16" }] = { 44 | hl = { 45 | ReactiveCursor = { bg = palette.mauve }, 46 | }, 47 | }, 48 | -- select 49 | [{ "s", "S", "\x13" }] = { 50 | hl = { 51 | ReactiveCursor = { bg = palette.pink }, 52 | }, 53 | }, 54 | }, 55 | } 56 | end 57 | 58 | function M.cursorline(name, palette) 59 | local darken = require("catppuccin.utils.colors").darken 60 | 61 | return { 62 | name = name, 63 | static = { 64 | winhl = { 65 | inactive = { 66 | CursorLine = { bg = darken(palette.surface0, 0.75) }, 67 | CursorLineNr = { bg = darken(palette.surface0, 0.75) }, 68 | }, 69 | }, 70 | }, 71 | modes = { 72 | -- insert mode 73 | i = { 74 | winhl = { 75 | CursorLine = { bg = darken(palette.sky, 0.3) }, 76 | CursorLineNr = { bg = darken(palette.sky, 0.3) }, 77 | }, 78 | }, 79 | -- normal mode 80 | n = { 81 | winhl = { 82 | CursorLine = { bg = palette.surface0 }, 83 | CursorLineNr = { bg = palette.surface0 }, 84 | }, 85 | }, 86 | -- operator-pending mode 87 | no = { 88 | operators = { 89 | [{ "gu", "gU", "g~", "~" }] = { 90 | winhl = { 91 | CursorLine = { bg = palette.surface2 }, 92 | CursorLineNr = { bg = palette.surface2 }, 93 | }, 94 | }, 95 | -- delete operator 96 | d = { 97 | winhl = { 98 | CursorLine = { bg = darken(palette.red, 0.4) }, 99 | CursorLineNr = { bg = darken(palette.red, 0.4) }, 100 | }, 101 | }, 102 | -- yank operator 103 | y = { 104 | winhl = { 105 | CursorLine = { bg = darken(palette.peach, 0.3) }, 106 | CursorLineNr = { bg = darken(palette.peach, 0.3) }, 107 | }, 108 | }, 109 | -- change operator 110 | c = { 111 | winhl = { 112 | CursorLine = { bg = darken(palette.blue, 0.4) }, 113 | CursorLineNr = { bg = darken(palette.blue, 0.4) }, 114 | }, 115 | }, 116 | }, 117 | }, 118 | R = { 119 | winhl = { 120 | CursorLine = { bg = darken(palette.sapphire, 0.4) }, 121 | CursorLineNr = { bg = darken(palette.sapphire, 0.4) }, 122 | }, 123 | }, 124 | -- visual mode 125 | [{ "v", "V", "\x16" }] = { 126 | winhl = { 127 | Visual = { bg = darken(palette.mauve, 0.4) }, 128 | }, 129 | }, 130 | -- select mode 131 | [{ "s", "S", "\x13" }] = { 132 | winhl = { 133 | Visual = { bg = darken(palette.pink, 0.4) }, 134 | }, 135 | }, 136 | }, 137 | } 138 | end 139 | 140 | return M 141 | -------------------------------------------------------------------------------- /lua/lualine/themes/catppuccin-frappe.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.lualine" "frappe" 2 | -------------------------------------------------------------------------------- /lua/lualine/themes/catppuccin-latte.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.lualine" "latte" 2 | -------------------------------------------------------------------------------- /lua/lualine/themes/catppuccin-macchiato.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.lualine" "macchiato" 2 | -------------------------------------------------------------------------------- /lua/lualine/themes/catppuccin-mocha.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.lualine" "mocha" 2 | -------------------------------------------------------------------------------- /lua/lualine/themes/catppuccin.lua: -------------------------------------------------------------------------------- 1 | return require "catppuccin.utils.lualine"() 2 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-frappe-cursor.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "frappe" 2 | local presets = require "catppuccin.utils.reactive" 3 | 4 | return presets.cursor("catppuccin-frappe-cursor", palette) 5 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-frappe-cursorline.lua: -------------------------------------------------------------------------------- 1 | local darken = require("catppuccin.utils.colors").darken 2 | local palette = require("catppuccin.palettes").get_palette "frappe" 3 | 4 | return { 5 | name = "catppuccin-frappe-cursorline", 6 | static = { 7 | winhl = { 8 | inactive = { 9 | CursorLine = { bg = darken(palette.surface0, 0.85) }, 10 | CursorLineNr = { bg = darken(palette.surface0, 0.85) }, 11 | }, 12 | }, 13 | }, 14 | modes = { 15 | i = { 16 | winhl = { 17 | CursorLine = { bg = darken(palette.sky, 0.4) }, 18 | CursorLineNr = { bg = darken(palette.sky, 0.4) }, 19 | }, 20 | }, 21 | n = { 22 | winhl = { 23 | CursorLine = { bg = palette.surface0 }, 24 | CursorLineNr = { bg = palette.surface0 }, 25 | }, 26 | }, 27 | no = { 28 | operators = { 29 | [{ "gu", "gU", "g~", "~" }] = { 30 | winhl = { 31 | CursorLine = { bg = palette.surface2 }, 32 | CursorLineNr = { bg = palette.surface2 }, 33 | }, 34 | }, 35 | -- delete operator 36 | d = { 37 | winhl = { 38 | CursorLine = { bg = darken(palette.red, 0.4) }, 39 | CursorLineNr = { bg = darken(palette.red, 0.4) }, 40 | }, 41 | }, 42 | -- yank operator 43 | y = { 44 | winhl = { 45 | CursorLine = { bg = darken(palette.peach, 0.4) }, 46 | CursorLineNr = { bg = darken(palette.peach, 0.4) }, 47 | }, 48 | }, 49 | -- change operator 50 | c = { 51 | winhl = { 52 | CursorLine = { bg = darken(palette.blue, 0.5) }, 53 | CursorLineNr = { bg = darken(palette.blue, 0.5) }, 54 | }, 55 | }, 56 | }, 57 | }, 58 | -- replace mode 59 | R = { 60 | winhl = { 61 | CursorLine = { bg = darken(palette.sapphire, 0.5) }, 62 | CursorLineNr = { bg = darken(palette.sapphire, 0.5) }, 63 | }, 64 | }, 65 | -- visual mode 66 | [{ "v", "V", "\x16" }] = { 67 | winhl = { 68 | Visual = { bg = darken(palette.mauve, 0.4) }, 69 | }, 70 | }, 71 | -- select mode 72 | [{ "s", "S", "\x13" }] = { 73 | winhl = { 74 | Visual = { bg = darken(palette.pink, 0.4) }, 75 | }, 76 | }, 77 | }, 78 | } 79 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-latte-cursor.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "latte" 2 | local presets = require "catppuccin.utils.reactive" 3 | 4 | local preset = presets.cursor("catppuccin-latte-cursor", palette) 5 | 6 | preset.modes.R.hl.ReactiveCursor = { bg = palette.flamingo } 7 | 8 | return preset 9 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-latte-cursorline.lua: -------------------------------------------------------------------------------- 1 | local lighten = require("catppuccin.utils.colors").lighten 2 | local palette = require("catppuccin.palettes").get_palette "latte" 3 | 4 | return { 5 | name = "catppuccin-latte-cursorline", 6 | static = { 7 | winhl = { 8 | inactive = { 9 | CursorLine = { bg = lighten(palette.surface0, 0.5) }, 10 | CursorLineNr = { bg = lighten(palette.surface0, 0.5) }, 11 | }, 12 | }, 13 | }, 14 | modes = { 15 | i = { 16 | winhl = { 17 | CursorLine = { bg = lighten(palette.teal, 0.4) }, 18 | CursorLineNr = { bg = lighten(palette.teal, 0.4) }, 19 | }, 20 | }, 21 | n = { 22 | winhl = { 23 | CursorLine = { bg = palette.surface0 }, 24 | CursorLineNr = { bg = palette.surface0 }, 25 | }, 26 | }, 27 | no = { 28 | operators = { 29 | [{ "gu", "gU", "g~", "~" }] = { 30 | winhl = { 31 | CursorLine = { bg = palette.surface2 }, 32 | CursorLineNr = { bg = palette.surface2 }, 33 | }, 34 | }, 35 | -- delete operator 36 | d = { 37 | winhl = { 38 | CursorLine = { bg = lighten(palette.red, 0.3) }, 39 | CursorLineNr = { bg = lighten(palette.red, 0.3) }, 40 | }, 41 | }, 42 | -- yank operator 43 | y = { 44 | winhl = { 45 | CursorLine = { bg = lighten(palette.peach, 0.3) }, 46 | CursorLineNr = { bg = lighten(palette.peach, 0.3) }, 47 | }, 48 | }, 49 | -- change operator 50 | c = { 51 | winhl = { 52 | CursorLine = { bg = lighten(palette.blue, 0.3) }, 53 | CursorLineNr = { bg = lighten(palette.blue, 0.3) }, 54 | }, 55 | }, 56 | }, 57 | }, 58 | -- visual 59 | [{ "v", "V", "\x16" }] = { 60 | winhl = { 61 | Visual = { bg = lighten(palette.mauve, 0.3) }, 62 | }, 63 | }, 64 | -- select 65 | [{ "s", "S", "\x13" }] = { 66 | winhl = { 67 | Visual = { bg = lighten(palette.pink, 0.3) }, 68 | }, 69 | }, 70 | R = { 71 | winhl = { 72 | CursorLine = { bg = lighten(palette.flamingo, 0.2) }, 73 | CursorLineNr = { bg = lighten(palette.flamingo, 0.2) }, 74 | }, 75 | }, 76 | }, 77 | } 78 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-macchiato-cursor.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "macchiato" 2 | local presets = require "catppuccin.utils.reactive" 3 | 4 | return presets.cursor("catppuccin-macchiato-cursor", palette) 5 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-macchiato-cursorline.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "macchiato" 2 | local presets = require "catppuccin.utils.reactive" 3 | local darken = require("catppuccin.utils.colors").darken 4 | 5 | local preset = presets.cursorline("catppuccin-macchiato-cursorline", palette) 6 | 7 | preset.static.winhl.inactive.CursorLine = { bg = darken(palette.surface0, 0.8) } 8 | preset.static.winhl.inactive.CursorLineNr = { bg = darken(palette.surface0, 0.8) } 9 | 10 | return preset 11 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-mocha-cursor.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "mocha" 2 | local presets = require "catppuccin.utils.reactive" 3 | 4 | return presets.cursor("catppuccin-mocha-cursor", palette) 5 | -------------------------------------------------------------------------------- /lua/reactive/presets/catppuccin-mocha-cursorline.lua: -------------------------------------------------------------------------------- 1 | local palette = require("catppuccin.palettes").get_palette "mocha" 2 | local presets = require "catppuccin.utils.reactive" 3 | 4 | return presets.cursorline("catppuccin-mocha-cursorline", palette) 5 | -------------------------------------------------------------------------------- /nvim.tera: -------------------------------------------------------------------------------- 1 | --- 2 | whiskers: 3 | version: 2.5.1 4 | matrix: 5 | - flavor 6 | filename: "lua/catppuccin/palettes/{{flavor.identifier}}.lua" 7 | --- 8 | return { 9 | {%- for id, color in flavor.colors %} 10 | {{id}} = "#{{color.hex}}", 11 | {%- endfor %} 12 | } 13 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>catppuccin/renovate-config" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 120 2 | line_endings = "Unix" 3 | indent_type = "Tabs" 4 | indent_width = 4 5 | quote_style = "AutoPreferDouble" 6 | collapse_simple_statement = "Always" 7 | call_parentheses = "None" 8 | -------------------------------------------------------------------------------- /tests/flavour_spec.lua: -------------------------------------------------------------------------------- 1 | local function reload() 2 | for name, _ in pairs(package.loaded) do 3 | if name:match "^catppuccin" then package.loaded[name] = nil end 4 | end 5 | vim.g.catppuccin_flavour = nil 6 | vim.cmd [[highlight clear]] 7 | end 8 | 9 | describe("set background to", function() 10 | before_each(function() 11 | reload() 12 | vim.cmd.colorscheme "catppuccin" 13 | end) 14 | it("light", function() 15 | vim.o.background = "light" 16 | assert.equals("catppuccin-latte", vim.g.colors_name) 17 | end) 18 | it("dark", function() 19 | vim.o.background = "dark" 20 | assert.equals("catppuccin-mocha", vim.g.colors_name) 21 | end) 22 | end) 23 | 24 | describe("respect vim.o.background =", function() 25 | before_each(function() reload() end) 26 | it("light", function() 27 | vim.o.background = "light" 28 | vim.cmd.colorscheme "catppuccin" 29 | assert.equals("catppuccin-latte", vim.g.colors_name) 30 | end) 31 | it("dark", function() 32 | vim.o.background = "dark" 33 | vim.cmd.colorscheme "catppuccin" 34 | assert.equals("catppuccin-mocha", vim.g.colors_name) 35 | end) 36 | end) 37 | 38 | describe("change flavour to", function() 39 | before_each(function() reload() end) 40 | it("latte", function() 41 | vim.cmd.colorscheme "catppuccin-latte" 42 | assert.equals("catppuccin-latte", vim.g.colors_name) 43 | end) 44 | it("frappe", function() 45 | vim.cmd.colorscheme "catppuccin-frappe" 46 | assert.equals("catppuccin-frappe", vim.g.colors_name) 47 | end) 48 | it("macchiato", function() 49 | vim.cmd.colorscheme "catppuccin-macchiato" 50 | assert.equals("catppuccin-macchiato", vim.g.colors_name) 51 | end) 52 | it("mocha", function() 53 | vim.cmd.colorscheme "catppuccin-mocha" 54 | assert.equals("catppuccin-mocha", vim.g.colors_name) 55 | end) 56 | end) 57 | 58 | describe("respect setup flavour =", function() 59 | before_each(function() reload() end) 60 | it("latte", function() 61 | require("catppuccin").setup { flavour = "latte" } 62 | vim.cmd.colorscheme "catppuccin" 63 | assert.equals("catppuccin-latte", vim.g.colors_name) 64 | end) 65 | it("frappe", function() 66 | require("catppuccin").setup { flavour = "frappe" } 67 | vim.cmd.colorscheme "catppuccin" 68 | assert.equals("catppuccin-frappe", vim.g.colors_name) 69 | end) 70 | it("macchiato", function() 71 | require("catppuccin").setup { flavour = "macchiato" } 72 | vim.cmd.colorscheme "catppuccin" 73 | assert.equals("catppuccin-macchiato", vim.g.colors_name) 74 | end) 75 | it("mocha", function() 76 | require("catppuccin").setup { flavour = "mocha" } 77 | vim.cmd.colorscheme "catppuccin" 78 | assert.equals("catppuccin-mocha", vim.g.colors_name) 79 | end) 80 | end) 81 | 82 | describe("(deprecated) respect vim.g.catppuccin_flavour =", function() 83 | before_each(function() reload() end) 84 | it("latte", function() 85 | vim.g.catppuccin_flavour = "latte" 86 | vim.cmd.colorscheme "catppuccin" 87 | assert.equals("catppuccin-latte", vim.g.colors_name) 88 | end) 89 | it("frappe", function() 90 | vim.g.catppuccin_flavour = "frappe" 91 | vim.cmd.colorscheme "catppuccin" 92 | assert.equals("catppuccin-frappe", vim.g.colors_name) 93 | end) 94 | it("macchiato", function() 95 | vim.g.catppuccin_flavour = "macchiato" 96 | vim.cmd.colorscheme "catppuccin" 97 | assert.equals("catppuccin-macchiato", vim.g.colors_name) 98 | end) 99 | it("mocha", function() 100 | vim.g.catppuccin_flavour = "mocha" 101 | vim.cmd.colorscheme "catppuccin" 102 | assert.equals("catppuccin-mocha", vim.g.colors_name) 103 | end) 104 | end) 105 | -------------------------------------------------------------------------------- /tests/hash_spec.lua: -------------------------------------------------------------------------------- 1 | describe("hash", function() 2 | local hash = require("catppuccin.lib.hashing").hash 3 | it("typo", function() assert.are_not.equals(hash { custom_highlight = {} }, hash { ustom_highlight = {} }) end) 4 | it( 5 | "when table order is shuffled", 6 | function() 7 | assert.equals( 8 | hash { 9 | custom_highlight = { 10 | Search = { fg = "#F5C2E7", bg = "#45475A", style = { "bold" } }, 11 | IncSearch = { fg = "#45475A", bg = "#F5C2E7" }, 12 | }, 13 | }, 14 | hash { 15 | custom_highlight = { 16 | Search = { style = { "bold" }, bg = "#45475A", fg = "#F5C2E7" }, 17 | IncSearch = { bg = "#F5C2E7", fg = "#45475A" }, 18 | }, 19 | } 20 | ) 21 | end 22 | ) 23 | it( 24 | "when toggle true/false", 25 | function() 26 | assert.are_not.equals({ 27 | integrations = { 28 | navic = true, 29 | noice = true, 30 | fidget = true, 31 | }, 32 | }, { 33 | integrations = { 34 | navic = true, 35 | noice = false, 36 | fidget = false, 37 | }, 38 | }) 39 | end 40 | ) 41 | end) 42 | -------------------------------------------------------------------------------- /tests/init.lua: -------------------------------------------------------------------------------- 1 | local status, error = pcall(function() 2 | local root = vim.fn.fnamemodify(".repro", ":p") 3 | for _, name in ipairs { "config", "data", "state", "cache" } do 4 | vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name 5 | end 6 | 7 | local lazypath = root .. "/plugins/lazy.nvim" 8 | if not vim.loop.fs_stat(lazypath) then 9 | vim.fn.system { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath } 10 | end 11 | vim.opt.runtimepath:prepend(lazypath) 12 | 13 | require("lazy").setup({ 14 | { "catppuccin/nvim", dev = true }, 15 | }, { 16 | root = root .. "/plugins", 17 | dev = { 18 | path = debug.getinfo(1).source:sub(2, -21), 19 | }, 20 | }) 21 | 22 | require("catppuccin").setup() 23 | vim.cmd.colorscheme "catppuccin" 24 | end) 25 | 26 | if error then print(error) end 27 | vim.cmd(status and "0cq" or "1cq") 28 | -------------------------------------------------------------------------------- /tests/init.vim: -------------------------------------------------------------------------------- 1 | try 2 | call plug#begin() 3 | Plug expand('')[0:-16] 4 | call plug#end() 5 | 6 | lua require("catppuccin").setup {} 7 | colorscheme catppuccin 8 | catch 9 | echo v:exception 10 | 1cq 11 | finally 12 | 0cq 13 | endtry 14 | -------------------------------------------------------------------------------- /tests/minimal_init.vim: -------------------------------------------------------------------------------- 1 | set rtp+=. 2 | 3 | runtime! plugin/plenary.vim 4 | -------------------------------------------------------------------------------- /tests/palette_spec.lua: -------------------------------------------------------------------------------- 1 | local function reload() 2 | for name, _ in pairs(package.loaded) do 3 | if name:match "^catppuccin" then package.loaded[name] = nil end 4 | end 5 | vim.g.catppuccin_flavour = nil 6 | vim.cmd [[highlight clear]] 7 | end 8 | 9 | -- TODO: Move this to setup_spec 10 | describe("get palette", function() 11 | before_each(function() reload() end) 12 | it("before setup", function() 13 | assert.equals(pcall(function() require("catppuccin.palettes").get_palette() end), true) 14 | end) 15 | it("after setup", function() 16 | require("catppuccin").setup() 17 | assert.equals(pcall(function() require("catppuccin.palettes").get_palette() end), true) 18 | end) 19 | end) 20 | --------------------------------------------------------------------------------