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 May 22, 2024
2 parents f4909fb + d97387a commit 389473c
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 18 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## [1.7.0](https://github.com/catppuccin/nvim/compare/v1.6.0...v1.7.0) (2024-04-13)


### Features

* add ability to toggle default integrations ([#687](https://github.com/catppuccin/nvim/issues/687)) ([e60e400](https://github.com/catppuccin/nvim/commit/e60e400c411519f29e203185ddda121d4ec8ef57))
* add support for `outline.nvim` plugin ([#647](https://github.com/catppuccin/nvim/issues/647)) ([048c18f](https://github.com/catppuccin/nvim/commit/048c18fc531703815f5e10765ea46ce9b2c75ae4))
* **defaults:** enable neotree ([c536623](https://github.com/catppuccin/nvim/commit/c536623eac60f8443c93ae4ca0e03b51574b5f50))
* **defaults:** enable treesitter context ([dc392c0](https://github.com/catppuccin/nvim/commit/dc392c067739326c3cff380a8c52b0f31319e6dd)), closes [#683](https://github.com/catppuccin/nvim/issues/683)
* **feline:** fix feline integration ([#685](https://github.com/catppuccin/nvim/issues/685)) ([07679af](https://github.com/catppuccin/nvim/commit/07679af1af4f446655682ee2557b5840ac551504))
* **feline:** improve feline lsp display ([#688](https://github.com/catppuccin/nvim/issues/688)) ([f66654d](https://github.com/catppuccin/nvim/commit/f66654d5d5190865333e8e46474c1593302c558e))
* **integration:** add reactive.nvim integration ([#654](https://github.com/catppuccin/nvim/issues/654)) ([151e478](https://github.com/catppuccin/nvim/commit/151e478edf8108cfd451a3cbd44d0a20503e7b42))
* **lsp:** add highlight for `LspCodeLensSeparator` ([#693](https://github.com/catppuccin/nvim/issues/693)) ([02bdd74](https://github.com/catppuccin/nvim/commit/02bdd749931a5d739063562e57531c118e081882))
* set `[@comment](https://github.com/comment).warning` that does not affect readability in gitcommit ([#675](https://github.com/catppuccin/nvim/issues/675)) ([045e349](https://github.com/catppuccin/nvim/commit/045e3499d9ec8d84635fb08877ae44fd33f6a38d))
* **treesitter:** add styles.miscs to disable hardcoded italics ([#659](https://github.com/catppuccin/nvim/issues/659)) ([c0de3b4](https://github.com/catppuccin/nvim/commit/c0de3b46811fe1ce3912e2245a9dfbea6b41c300))
* **treesitter:** follow upstream captures ([#630](https://github.com/catppuccin/nvim/issues/630)) ([f288876](https://github.com/catppuccin/nvim/commit/f288876c6d05d3bb91b0e72b8031fe9e26ef05b8))
* **treesitter:** follow upstream captures ([#694](https://github.com/catppuccin/nvim/issues/694)) ([08c6417](https://github.com/catppuccin/nvim/commit/08c6417bdc3b29e5f8c53e2cfe4067f288d49a54))
* use a more distinguishable color for todos ([#645](https://github.com/catppuccin/nvim/issues/645)) ([657cc4f](https://github.com/catppuccin/nvim/commit/657cc4f35cf193cadac7e5471eb802c97e7a1b59))


### Bug Fixes

* **compile:** string.dump isn't deterministic ([836de8b](https://github.com/catppuccin/nvim/commit/836de8bc1898250b69332e66cbe993058870f849)), closes [#664](https://github.com/catppuccin/nvim/issues/664)
* **dropbar:** correct keyword highlight link ([#652](https://github.com/catppuccin/nvim/issues/652)) ([afab7ec](https://github.com/catppuccin/nvim/commit/afab7ec2a79c7127627dede79c0018b6e45663d0))
* ensure consistency between JSX and HTML markup ([#660](https://github.com/catppuccin/nvim/issues/660)) ([9703f22](https://github.com/catppuccin/nvim/commit/9703f227bfab20d04bcee62d2f08f1795723b4ae))
* **flavour:** g:catppuccin_flavour backwards compatibility ([fc98570](https://github.com/catppuccin/nvim/commit/fc98570d85ae772e56dc42cf8d7d6a497a909bdb))
* **flavour:** respect terminal's background ([#696](https://github.com/catppuccin/nvim/issues/696)) ([d5760c5](https://github.com/catppuccin/nvim/commit/d5760c53ae3b48f0f539298ec4165adc5c0afb19))
* **illuminate:** update type ([#690](https://github.com/catppuccin/nvim/issues/690)) ([30930f9](https://github.com/catppuccin/nvim/commit/30930f9656cffd068bcf52ced70cdfffd1e83a44))
* **integrations:** respect default options ([c2e6f8e](https://github.com/catppuccin/nvim/commit/c2e6f8e7eb8d0ebf55700c89bdf842809aeecf09))
* **neotree:** add `NeoTreeModified` ([#642](https://github.com/catppuccin/nvim/issues/642)) ([6853cc8](https://github.com/catppuccin/nvim/commit/6853cc8e6efc76e85e10ec153d05fc2520653508))
* **neotree:** blend sidebar with win separator ([56fb982](https://github.com/catppuccin/nvim/commit/56fb98218d22d5c326387bf9e4076227e7372e6b)), closes [#670](https://github.com/catppuccin/nvim/issues/670)
* repair treesitter underlined text (`Underline` -> `Underlined`) ([#663](https://github.com/catppuccin/nvim/issues/663)) ([42b687c](https://github.com/catppuccin/nvim/commit/42b687c42a35633366ed45e562bf921fb914048b))
* respect background variable on startup ([6b7a4df](https://github.com/catppuccin/nvim/commit/6b7a4dfdf241c8be0af6ec691b302e85cce03cab))
* **semantic_tokens:** namespace -> module ([196f301](https://github.com/catppuccin/nvim/commit/196f301de06090c40d7f98297675ac38ae7d6675))
* **treesitter:** some captures missing leading `@` ([#650](https://github.com/catppuccin/nvim/issues/650)) ([bc1f215](https://github.com/catppuccin/nvim/commit/bc1f2151f23227ba02ac203c2c59ad693352a741))
* use external index for lsp counting ([c3572a9](https://github.com/catppuccin/nvim/commit/c3572a968a79b64bd0ef16f2c3e93014f112e66d))
* wrong color shown when using color_overrides ([#658](https://github.com/catppuccin/nvim/issues/658)) ([b76ada8](https://github.com/catppuccin/nvim/commit/b76ada82bf2019d5e343018b4104cc9266900c16)), closes [#657](https://github.com/catppuccin/nvim/issues/657)

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


Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ There is no need to call `setup` if you don't want to change the default options

```lua
require("catppuccin").setup({
flavour = "mocha", -- latte, frappe, macchiato, mocha
-- flavour = "auto" -- will respect terminal's background
flavour = "auto", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
Expand Down Expand Up @@ -459,6 +458,23 @@ native_lsp = {
</tr>
<!-- coc.nvim -->

<!-- colorful-winsep.nvim -->
</tr>
<tr>
<td> <a href="https://github.com/nvim-zh/colorful-winsep.nvim">colorful-winsep.nvim</a>
</td>
<td>

```lua
colorful_winsep = {
enabled = false,
color = "red",
}
```
</td>
</tr>
<!-- colorful_winsep.nvim -->

<!-- dashboard-nvim -->
</tr>
<tr>
Expand All @@ -473,6 +489,20 @@ dashboard = true
</tr>
<!-- dashboard-nvim -->

<!-- diffview.nvim -->
</tr>
<tr>
<td> <a href="https://github.com/sindrets/diffview.nvim">diffview.nvim</a> </td>
<td>

```lua
diffview = false
```

</td>
</tr>
<!-- diffview.nvim -->

<!-- dropbar.nvim -->
</tr>
<tr>
Expand Down
15 changes: 13 additions & 2 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Table of Contents *catppuccin-table-of-contents*
- Wrong treesitter highlights |catppuccin-faq-wrong-treesitter-highlights|
- Colors doesn’t match preview screenshots|catppuccin-faq-colors-doesn’t-match-preview-screenshots|
9. Thanks to |catppuccin-thanks-to|
10. Links |catppuccin-links|

==============================================================================
1. Features *catppuccin-features*
Expand Down Expand Up @@ -70,8 +71,7 @@ options and settings.

>lua
require("catppuccin").setup({
flavour = "mocha", -- latte, frappe, macchiato, mocha
-- flavour = "auto" -- will respect terminal's background
flavour = "auto", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
Expand Down Expand Up @@ -379,10 +379,21 @@ directly at the thing (e.g. an error)).
},
<

colorful-winsep.nvim>lua
colorful_winsep = {
enabled = false,
color = "red",
}
<

dashboard-nvim>lua
dashboard = true
<

diffview.nvim>lua
diffview = false
<

dropbar.nvim>lua
dropbar = {
enabled = false,
Expand Down
9 changes: 9 additions & 0 deletions lua/catppuccin/groups/integrations/colorful_winsep.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
local M = {}

function M.get()
return {
NvimSeparator = { bg = C.base, fg = C[O.integrations.colorful_winsep.color] },
}
end

return M
41 changes: 41 additions & 0 deletions lua/catppuccin/groups/integrations/diffview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local M = {}

function M.get()
return {
DiffviewDim1 = { link = "Comment" },
DiffviewPrimary = { fg = C.blue },
DiffviewSecondary = { fg = C.green },
DiffviewNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle },
DiffviewWinSeparator = {
fg = O.transparent_background and C.surface1 or C.base,
bg = O.transparent_background and C.none or C.base,
},
DiffviewFilePanelTitle = { fg = C.blue, style = { "bold" } },
DiffviewFilePanelCounter = { fg = C.text },
DiffviewFilePanelRootPath = { fg = C.lavender, style = { "bold" } },
DiffviewFilePanelFileName = { fg = C.text },
DiffviewFilePanelSelected = { fg = C.yellow },
DiffviewFilePanelPath = { link = "Comment" },
DiffviewFilePanelInsertions = { fg = C.green },
DiffviewFilePanelDeletions = { fg = C.red },
DiffviewFilePanelConflicts = { fg = C.yellow },
DiffviewFolderName = { fg = C.blue, style = { "bold" } },
DiffviewFolderSign = { fg = C.blue },
DiffviewHash = { fg = C.flamingo },
DiffviewReference = { fg = C.blue, style = { "bold" } },
DiffviewReflogSelector = { fg = C.pink },
DiffviewStatusAdded = { fg = C.green },
DiffviewStatusUntracked = { fg = C.green },
DiffviewStatusModified = { fg = C.yellow },
DiffviewStatusRenamed = { fg = C.yellow },
DiffviewStatusCopied = { fg = C.yellow },
DiffviewStatusTypeChange = { fg = C.yellow },
DiffviewStatusUnmerged = { fg = C.yellow },
DiffviewStatusUnknown = { fg = C.red },
DiffviewStatusDeleted = { fg = C.red },
DiffviewStatusBroken = { fg = C.red },
DiffviewStatusIgnored = { fg = C.overlay0 },
}
end

return M
2 changes: 1 addition & 1 deletion lua/catppuccin/groups/integrations/headlines.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local M = {}
function M.get()
return {
Dash = { fg = C.overlay2, style = { "bold" } },
Quote = { link = "@text.strong" },
Quote = { link = "@markup.strong" },
CodeBlock = { bg = C.mantle },
Headline = { link = "Headline1" },
Headline1 = { bg = C.surface0, fg = C.red },
Expand Down
19 changes: 8 additions & 11 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if is_vim then require "catppuccin.lib.vim" end
---@type Catppuccin
local M = {
default_options = {
flavour = "auto",
background = {
light = "latte",
dark = "mocha",
Expand Down Expand Up @@ -42,6 +43,7 @@ local M = {
dap = true,
dap_ui = true,
dashboard = true,
diffview = false,
flash = true,
gitsigns = true,
markdown = true,
Expand Down Expand Up @@ -95,6 +97,10 @@ local M = {
enabled = true,
color_mode = false,
},
colorful_winsep = {
enabled = false,
color = "red",
},
},
color_overrides = {},
highlight_overrides = {},
Expand Down Expand Up @@ -125,7 +131,7 @@ local function get_flavour(default)
if flavour and not M.flavours[flavour] then
vim.notify(
string.format(
"Catppuccin (error): Invalid flavour '%s', flavour must be 'latte', 'frappe', 'macchiato' or 'mocha'",
"Catppuccin (error): Invalid flavour '%s', flavour must be 'latte', 'frappe', 'macchiato', 'mocha' or 'auto'",
flavour
),
vim.log.levels.ERROR
Expand All @@ -140,15 +146,6 @@ local did_setup = false
function M.load(flavour)
if M.options.flavour == "auto" then -- set colorscheme based on o:background
M.options.flavour = nil -- ensure that this will only run once on startup
if not vim.api.nvim_get_option_info2("background", {}).was_set then -- wait for terminal to set o:background
vim.api.nvim_create_autocmd("OptionSet", { -- https://github.com/neovim/neovim/pull/26284
once = true,
nested = true,
pattern = "background",
callback = function() M.load(flavour) end,
})
return
end
end
if not did_setup then M.setup() end
M.flavour = get_flavour(flavour)
Expand All @@ -158,7 +155,7 @@ function M.load(flavour)
M.compile()
f = assert(loadfile(compiled_path), "could not load cache")
end
f()
f(flavour or M.options.flavour or vim.g.catppuccin_flavour)
end

---@type fun(user_conf: CatppuccinOptions?)
Expand Down
4 changes: 2 additions & 2 deletions lua/catppuccin/lib/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function M.compile(flavour)
local lines = {
string.format(
[[
return string.dump(function()
return string.dump(function(flavour)
vim.o.termguicolors = true
if vim.g.colors_name then vim.cmd("hi clear") end
vim.o.background = "%s"
if flavour then vim.o.background = "%s" end
vim.g.colors_name = "catppuccin-%s"
local h = vim.api.nvim_set_hl]],
flavour == "latte" and "light" or "dark",
Expand Down
8 changes: 8 additions & 0 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
---```
---@field barbecue CtpIntegrationBarbecue | boolean?
---@field beacon boolean?
---@field colorful_winsep CtpIntegrationColorfulWinsep | boolean?
---@field cmp boolean?
-- `coc.nvim` links to `native_lsp` highlight groups, so you can use
-- `native_lsp.virtual_text` and `native_lsp.underlines` to style diagnostics.
Expand All @@ -132,6 +133,7 @@
---@field dap boolean?
---@field dap_ui boolean?
---@field dashboard boolean?
---@field diffview boolean?
---@field dropbar CtpIntegrationDropbar | boolean?
---@field fern boolean?
-- Set `notification.window.winblend` to `0` in your `fidget` config:
Expand Down Expand Up @@ -210,6 +212,12 @@
-- Whether the directory name should be dimmed.
---@field dim_dirname boolean?

---@class CtpIntegrationColorfulWinsep
-- Whether to enable the colorful-winsep integration.
---@field enabled boolean
-- Set to a Catppuccin color name to use for the split separator.
---@field color CtpColor?

---@class CtpIntegrationDropbar
-- Whether to enable the dropbar integration.
---@field enabled boolean
Expand Down

0 comments on commit 389473c

Please sign in to comment.