Skip to content

Commit

Permalink
Merge branch 'main' into refactor/syntax-highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jint-lzxy committed Jan 5, 2024
2 parents 9da4a01 + 5e36ca5 commit 30c67cd
Show file tree
Hide file tree
Showing 20 changed files with 292 additions and 684 deletions.
7 changes: 3 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ Here are some guidelines:
- New plugin integration should be added in alphabetical order:
- to the [README](https://github.com/catppuccin/nvim#integrations) (vimdoc is auto-generated).
- to [types.lua](https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/types.lua)
- to [vim.yml](https://github.com/catppuccin/nvim/blob/main/vim.yml)
- Create a topic branch on your fork for your specific PR.
- Use [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/)
- Use [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/)
rules for explicit and meaningful commit messages.
- If it's your first time contributing to a project, then read
[About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
- If it's your first time contributing to a project, then read
[About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
on Github's docs.

Here are some tips:
Expand Down
14 changes: 14 additions & 0 deletions .github/scripts/update-palette.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import json
import urllib.request

url = "https://github.com/catppuccin/palette/raw/main/palette.json"

with urllib.request.urlopen(url) as response:
flavors = json.loads(response.read().decode())

for flavor in flavors:
with open(f"lua/catppuccin/palettes/{flavor}.lua", "w") as f:
f.write("return {\n")
for color in flavors[flavor]["colors"]:
f.write(f'\t{color} = "{flavors[flavor]["colors"][color]["hex"]}",\n')
f.write("}\n")
11 changes: 1 addition & 10 deletions .github/workflows/palette.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@ jobs:
- uses: actions/checkout@v3

- name: Make changes to pull request
run: |
curl -o /tmp/palette.json https://raw.githubusercontent.com/catppuccin/palette/main/palette.json
python -c "import json
data = json.load(open('/tmp/palette.json'))
for flavour in data:
with open('lua/catppuccin/palettes/{flavour}.lua'.format(flavour = flavour), 'w') as f:
f.write('return {\n')
for accent in data[flavour]: f.write('\t{accent} = \"{hex}\",\n'.format(accent = accent, hex = data[flavour][accent]['hex']))
f.write('}\n')"
run: python3 ./.github/scripts/update-palette.py

- name: Create Pull Request
id: cpr
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/selene.yml

This file was deleted.

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## [1.6.0](https://github.com/catppuccin/nvim/compare/v1.5.0...v1.6.0) (2023-12-28)


### Features

* add `WinSeperator` highlight group ([#623](https://github.com/catppuccin/nvim/issues/623)) ([988c0b2](https://github.com/catppuccin/nvim/commit/988c0b2dde4140572ed37c6b8b5d5deac0219f9f))
* **bufferline:** support `no_underline` option ([#601](https://github.com/catppuccin/nvim/issues/601)) ([f7638a1](https://github.com/catppuccin/nvim/commit/f7638a1a65cbffdd01a9ddac0018a20ec4be29e2))
* **dashboard:** add highlight groups for `doom` theme ([#593](https://github.com/catppuccin/nvim/issues/593)) ([3bdd5e8](https://github.com/catppuccin/nvim/commit/3bdd5e8296971f8c7ba5e499dac8247c3d621508))
* **integrations:** enable dap & dap_ui by default ([64dc309](https://github.com/catppuccin/nvim/commit/64dc309bc157779691be38bbfc5123584e0a4a85))
* **lualine:** darken lualine `b` section for better readability ([#606](https://github.com/catppuccin/nvim/issues/606)) ([32ee05d](https://github.com/catppuccin/nvim/commit/32ee05d014a4611555c7f56a73283efb4718d9c5))
* **mini.indentscope:** add scope color ([#592](https://github.com/catppuccin/nvim/issues/592)) ([795f639](https://github.com/catppuccin/nvim/commit/795f639ac50d6b8400c1d5868fca54844d579f37))
* **neogit:** support new highlight groups ([#610](https://github.com/catppuccin/nvim/issues/610)) ([f90c7c0](https://github.com/catppuccin/nvim/commit/f90c7c0c467722dc7acacbae3c3904720e09efb6))
* **notify:** add `NotifyBackground` hl group ([#637](https://github.com/catppuccin/nvim/issues/637)) ([c7cf3af](https://github.com/catppuccin/nvim/commit/c7cf3afe2eb6d9058eec4abb3ace2c1da006478a))


### Bug Fixes

* **airline:** missing refresh function ([dcef0a0](https://github.com/catppuccin/nvim/commit/dcef0a062de380885193fb0f919217d58b979753)), closes [#594](https://github.com/catppuccin/nvim/issues/594)
* **dashboard:** `orange` -> `peach` ([54002a1](https://github.com/catppuccin/nvim/commit/54002a1adfd543f54352b3ec79d4e62c4163e9ee))
* **flash:** link `FlashPrompt` to `NormalFloat` ([#605](https://github.com/catppuccin/nvim/issues/605)) ([40dc9f0](https://github.com/catppuccin/nvim/commit/40dc9f0621c55bd40da4ad0731fac44d15bb393a))
* **lualine:** match lualine mode colors for insert and terminal ([#597](https://github.com/catppuccin/nvim/issues/597)) ([ea52fe8](https://github.com/catppuccin/nvim/commit/ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0))
* **neogit:** remove `NeogitCursorLine` from integration ([#613](https://github.com/catppuccin/nvim/issues/613)) ([5e4be43](https://github.com/catppuccin/nvim/commit/5e4be43e1a6acb044d5c55cd10f22461c40656ed))
* **neogit:** remove diff context highlight fg ([1b40f07](https://github.com/catppuccin/nvim/commit/1b40f072305be71b73c730ff5c7d881e638fd040)), closes [#627](https://github.com/catppuccin/nvim/issues/627)
* **neogit:** tweak diff context highlighting ([#614](https://github.com/catppuccin/nvim/issues/614)) ([cc717ac](https://github.com/catppuccin/nvim/commit/cc717acba29259d578548973c41448b092453c52))
* **neotree:** change color of untracked files ([#608](https://github.com/catppuccin/nvim/issues/608)) ([d7521f6](https://github.com/catppuccin/nvim/commit/d7521f6050b94cb0e23067f63829d86886f870fe))
* **neotree:** make popup titlebar text visible ([#618](https://github.com/catppuccin/nvim/issues/618)) ([919d1f7](https://github.com/catppuccin/nvim/commit/919d1f786338ebeced798afbf28cd085cd54542a))
* **noice:** respect transparency ([#632](https://github.com/catppuccin/nvim/issues/632)) ([4fbab1f](https://github.com/catppuccin/nvim/commit/4fbab1f01488718c3d54034a473d0346346b90e3))
* **selene:** allow mixed tables ([#611](https://github.com/catppuccin/nvim/issues/611)) ([9f3c13b](https://github.com/catppuccin/nvim/commit/9f3c13bbcf16fcaec3a429c03743a13e5923f3e3))
* sync focused and unfocused winbars ([#628](https://github.com/catppuccin/nvim/issues/628)) ([079500a](https://github.com/catppuccin/nvim/commit/079500a625f3ae5aa6efb758f1a17fe4c7a57e52))
* **vim:** resolve deprecation of nested [[ ([7a4bcda](https://github.com/catppuccin/nvim/commit/7a4bcdadafc59a5bedbd866c643fa486d8cca4a1))

## [1.5.0](https://github.com/catppuccin/nvim/compare/v1.4.0...v1.5.0) (2023-09-29)


Expand Down
44 changes: 27 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ require("catppuccin").setup {
}
```

> **Note**
> [!Note]
> For more information check out our [style-guide](https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md)
## Overwriting highlight groups
Expand Down Expand Up @@ -253,7 +253,7 @@ require("catppuccin").setup({

Below is a list of supported plugins and their corresponding integration module.

> **Important**
> [!Important]
> If you'd like to know which highlight groups are being affected by catppuccin, check out this directory: [`lua/catppuccin/groups/integrations/`](https://github.com/catppuccin/nvim/tree/main/lua/catppuccin/groups/integrations).
<table>
Expand Down Expand Up @@ -357,7 +357,7 @@ beacon = false

Update your bufferline config to use the Catppuccin components:

> **Note**
> [!NOTE]
> bufferline needs to be loaded after setting up catppuccin or it will highlight incorrectly
```lua
Expand Down Expand Up @@ -416,7 +416,7 @@ Setting `enabled` to `true` enables this integration.
```lua
coc_nvim = true,
```
> **Note**
> [!Note]
> coc.nvim by default link to native lsp highlight groups so config from `native_lsp` will also apply to coc
In the inners tables you can set the style for the diagnostics, both `virtual_text` (what you see on the side) and `underlines` (what points directly at the thing (e.g. an error)).
Expand Down Expand Up @@ -565,7 +565,7 @@ ctp_feline.setup({
})
```

> **Warning**
> [!Warning]
> Currently feline [doesn't officially support custom themes](https://github.com/feline-nvim/feline.nvim/issues/302). In order for `:colorscheme catppuccin-<flavour>` to work you could add this autocmd as a workaround:
```lua
Expand Down Expand Up @@ -612,13 +612,15 @@ fidget = false
```

<details> <summary>Special</summary>
Set `window.blend` to `0`:
Set `notification.window.winblend` to `0`:

```lua
require("fidget").setup {
window = {
blend = 0,
},
notification = {
window = {
winblend = 0,
},
}
-- ... the rest of your fidget config
}
```
Expand Down Expand Up @@ -936,22 +938,16 @@ cmp = true
<!-- nvim-dap -->
</tr>
<tr>
<td> <a href="https://github.com/mfussenegger/nvim-dap">nvim-dap</a> & <a href="https://github.com/rcarriga/nvim-dap-ui">nvim-dap-ui</a> </td>
<td> <a href="https://github.com/mfussenegger/nvim-dap">nvim-dap</a> </td>
<td>

```lua
dap = {
enabled = true,
enable_ui = true, -- enable nvim-dap-ui
}
dap = true
```

<details> <summary>Special</a> </summary>

```lua
-- You NEED to override nvim-dap's default highlight groups, AFTER requiring nvim-dap
require("dap")

local sign = vim.fn.sign_define

sign("DapBreakpoint", { text = "", texthl = "DapBreakpoint", linehl = "", numhl = ""})
Expand All @@ -965,6 +961,20 @@ sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl =
</tr>
<!-- nvim-dap -->

<!-- nvim-dap-ui -->
</tr>
<tr>
<td> <a href="https://github.com/rcarriga/nvim-dap-ui">nvim-dap-ui</a> </td>
<td>

```lua
dap_ui = true
```

</td>
</tr>
<!-- nvim-dap-ui -->

<!-- nvim-lspconfig -->
</tr>
<tr>
Expand Down
34 changes: 17 additions & 17 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ https://github.com/catppuccin/nvim/discussions/323 for inspirations:
<


**Note** For more information check out our style-guide
[!Note] For more information check out our style-guide
<https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md>

OVERWRITING HIGHLIGHT GROUPS*catppuccin-customize-highlights-overwriting-highlight-groups*
Expand Down Expand Up @@ -248,7 +248,7 @@ Below is a list of supported plugins and their corresponding integration
module.


**Important** If you’d like to know which highlight groups are being affected
[!Important] If you’d like to know which highlight groups are being affected
by catppuccin, check out this directory: `lua/catppuccin/groups/integrations/`
<https://github.com/catppuccin/nvim/tree/main/lua/catppuccin/groups/integrations>.
PluginDefaultaerial.nvim>lua
Expand Down Expand Up @@ -291,7 +291,7 @@ bufferline.nvimSpecial ~
Update your bufferline config to use the Catppuccin components:


**Note** bufferline needs to be loaded after setting up catppuccin or it will
[!NOTE] bufferline needs to be loaded after setting up catppuccin or it will
highlight incorrectly
>lua
use "akinsho/bufferline.nvim" {
Expand Down Expand Up @@ -340,7 +340,7 @@ Setting `enabled` to `true` enables this integration.
<


**Note** coc.nvim by default link to native lsp highlight groups so config from
[!Note] coc.nvim by default link to native lsp highlight groups so config from
`native_lsp` will also apply to coc
In the inners tables you can set the style for the diagnostics, both
`virtual_text` (what you see on the side) and `underlines` (what points
Expand Down Expand Up @@ -458,7 +458,7 @@ Here are the defaults:
<


**Warning** Currently feline doesn’t officially support custom themes
[!Warning] Currently feline doesn’t officially support custom themes
<https://github.com/feline-nvim/feline.nvim/issues/302>. In order for
`:colorscheme catppuccin-<flavour>` to work you could add this autocmd as a
workaround:
Expand All @@ -485,13 +485,15 @@ fidget.nvim>lua

Special ~

Set `window.blend` to `0`:
Set `notification.window.winblend` to `0`:

>lua
require("fidget").setup {
window = {
blend = 0,
},
notification = {
window = {
winblend = 0,
},
}
-- ... the rest of your fidget config
}
<
Expand Down Expand Up @@ -615,26 +617,24 @@ nvim-cmp>lua
cmp = true
<

nvim-dap & nvim-dap-ui>lua
dap = {
enabled = true,
enable_ui = true, -- enable nvim-dap-ui
}
nvim-dap>lua
dap = true
<

Special ~

>lua
-- You NEED to override nvim-dap's default highlight groups, AFTER requiring nvim-dap
require("dap")

local sign = vim.fn.sign_define

sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""})
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
<

nvim-dap-ui>lua
dap_ui = true
<

nvim-lspconfig>lua
native_lsp = {
enabled = true,
Expand Down
2 changes: 2 additions & 0 deletions lua/catppuccin/groups/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function M.get()
Whitespace = { fg = C.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
WildMenu = { bg = C.overlay0 }, -- current match in 'wildmenu' completion
WinBar = { fg = C.rosewater },
WinBarNC = { link = "WinBar" },
WinSeparator = { fg = O.transparent_background and C.surface1 or C.crust },
}
end

Expand Down
33 changes: 1 addition & 32 deletions lua/catppuccin/groups/integrations/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,11 @@ local M = {}

function M.get()
return {
-- nvim-dap
DapBreakpoint = { fg = C.red },
DapBreakpointCondition = { fg = C.yellow },
DapBreakpointRejected = { fg = C.mauve },
DapLogPoint = { fg = C.sky },
DapStopped = { fg = C.maroon },

-- nvim-dap-ui
DAPUIScope = { fg = C.sky },
DAPUIType = { fg = C.mauve },
DAPUIValue = { fg = C.sky },
DAPUIVariable = { fg = C.text },
DapUIModifiedValue = { fg = C.peach },
DapUIDecoration = { fg = C.sky },
DapUIThread = { fg = C.green },
DapUIStoppedThread = { fg = C.sky },
DapUISource = { fg = C.lavender },
DapUILineNumber = { fg = C.sky },
DapUIFloatBorder = { fg = C.sky },

DapUIWatchesEmpty = { fg = C.maroon },
DapUIWatchesValue = { fg = C.green },
DapUIWatchesError = { fg = C.maroon },

DapUIBreakpointsPath = { fg = C.sky },
DapUIBreakpointsInfo = { fg = C.green },
DapUIBreakpointsCurrentLine = { fg = C.green, style = { "bold" } },
DapUIBreakpointsDisabledLine = { fg = C.surface2 },

DapUIStepOver = { fg = C.blue },
DapUIStepInto = { fg = C.blue },
DapUIStepBack = { fg = C.blue },
DapUIStepOut = { fg = C.blue },
DapUIStop = { fg = C.red },
DapUIPlayPause = { fg = C.green },
DapUIRestart = { fg = C.green },
DapUIUnavailable = { fg = C.surface1 },
}
end

Expand Down
Loading

0 comments on commit 30c67cd

Please sign in to comment.