From d5760c53ae3b48f0f539298ec4165adc5c0afb19 Mon Sep 17 00:00:00 2001 From: Null Chilly <56817415+nullchilly@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:04:21 +0700 Subject: [PATCH 1/8] fix(flavour): respect terminal's background (#696) * fix(flavour): don't respect terminal if options.value is not nil --- README.md | 3 +-- doc/catppuccin.txt | 4 ++-- lua/catppuccin/init.lua | 14 +++----------- lua/catppuccin/lib/compiler.lua | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c2ddda40..b88b8d07 100644 --- a/README.md +++ b/README.md @@ -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", diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index e58428df..a4a4f9d8 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -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* @@ -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", diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index d6460317..839e96d5 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -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", @@ -125,7 +126,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 @@ -140,15 +141,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) @@ -158,7 +150,7 @@ function M.load(flavour) M.compile() f = assert(loadfile(compiled_path), "could not load cache") end - f() + f(flavour or M.options.flavour) end ---@type fun(user_conf: CatppuccinOptions?) diff --git a/lua/catppuccin/lib/compiler.lua b/lua/catppuccin/lib/compiler.lua index d669564e..5c844567 100644 --- a/lua/catppuccin/lib/compiler.lua +++ b/lua/catppuccin/lib/compiler.lua @@ -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", From 08c6417bdc3b29e5f8c53e2cfe4067f288d49a54 Mon Sep 17 00:00:00 2001 From: jint_lzxy_ <50296129+Jint-lzxy@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:37:25 +0800 Subject: [PATCH 2/8] feat(treesitter): follow upstream captures (#694) * feat(treesitter): follow upstream captures This PR primarily updated highlight groups related to treesitter captures to comply with the updated specification. Deprecated captures were relocated to the legacy section. All changes are based on the following four commits: - https://github.com/nvim-treesitter/nvim-treesitter/commit/99ddf573531c4dbe53f743ecbc1595af5eb1d32f - https://github.com/nvim-treesitter/nvim-treesitter/commit/5d75359a9ae20c492f96e6591e3a9e229d320c87 - https://github.com/nvim-treesitter/nvim-treesitter/commit/dccf31f9b1fbbbd09e6720c7d8f5f1a2433fd32d - https://github.com/nvim-treesitter/nvim-treesitter/commit/998b230a77b544761bae8aa7518d40b91a5c9559 I've attempted to keep the colors consistent for new additions by looking at the definitions of existing captures, but I'm _really_ not sure how to handle colors for documentation-related ones. AFAIU the only relevant existing capture is `@markup.raw`, but it seems better suited for smaller sections of documentation. Personally, I don't think a large block of greenish-blue would look great for extensive documents that might span multiple lines. Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- .../groups/integrations/headlines.lua | 2 +- .../groups/integrations/treesitter.lua | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lua/catppuccin/groups/integrations/headlines.lua b/lua/catppuccin/groups/integrations/headlines.lua index 3a626777..2b4f49c7 100644 --- a/lua/catppuccin/groups/integrations/headlines.lua +++ b/lua/catppuccin/groups/integrations/headlines.lua @@ -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 }, diff --git a/lua/catppuccin/groups/integrations/treesitter.lua b/lua/catppuccin/groups/integrations/treesitter.lua index aca5fabf..cd4981ec 100644 --- a/lua/catppuccin/groups/integrations/treesitter.lua +++ b/lua/catppuccin/groups/integrations/treesitter.lua @@ -28,10 +28,12 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- Literals ["@string"] = { link = "String" }, -- For strings. + ["@string.documentation"] = { fg = C.teal, style = O.styles.strings or {} }, -- For strings documenting code (e.g. Python docstrings). ["@string.regexp"] = { fg = C.peach, style = O.styles.strings or {} }, -- For regexes. ["@string.escape"] = { fg = C.pink, style = O.styles.strings or {} }, -- For escape characters within a string. ["@string.special"] = { link = "Special" }, -- other special strings (e.g. dates) - ["@string.special.symbol"] = { fg = C.flamingo }, + ["@string.special.path"] = { link = "Special" }, -- filenames + ["@string.special.symbol"] = { fg = C.flamingo }, -- symbols or atoms ["@string.special.url"] = { fg = C.rosewater, style = { "italic", "underline" } }, -- urls, links and emails ["@character"] = { link = "Character" }, -- character literals @@ -45,7 +47,6 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@type"] = { link = "Type" }, -- For types. ["@type.builtin"] = { fg = C.yellow, style = O.styles.properties or { "italic" } }, -- For builtin types. ["@type.definition"] = { link = "Type" }, -- type definitions (e.g. `typedef` in C) - ["@type.qualifier"] = { link = "Keyword" }, -- type qualifiers (e.g. `const`) ["@attribute"] = { link = "Constant" }, -- attribute annotations (e.g. Python decorators) ["@property"] = { fg = C.lavender, style = O.styles.properties or {} }, -- Same as TSField. @@ -64,15 +65,19 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- Keywords ["@keyword"] = { link = "Keyword" }, -- For keywords that don't fall in previous categories. + ["@keyword.modifier"] = { link = "Keyword" }, -- For keywords modifying other constructs (e.g. `const`, `static`, `public`) + ["@keyword.type"] = { link = "Keyword" }, -- For keywords describing composite types (e.g. `struct`, `enum`) + ["@keyword.coroutine"] = { link = "Keyword" }, -- For keywords related to coroutines (e.g. `go` in Go, `async/await` in Python) ["@keyword.function"] = { fg = C.mauve, style = O.styles.keywords or {} }, -- For keywords used to define a function. - ["@keyword.operator"] = { fg = C.mauve, style = O.styles.operators or {} }, -- For new keyword operator + ["@keyword.operator"] = { link = "Operator" }, -- For new keyword operator ["@keyword.import"] = { link = "Include" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua. - ["@keyword.storage"] = { link = "StorageClass" }, -- visibility/life-time/etc. modifiers (e.g. `static`) ["@keyword.repeat"] = { link = "Repeat" }, -- For keywords related to loops. ["@keyword.return"] = { fg = C.mauve, style = O.styles.keywords or {} }, + ["@keyword.debug"] = { link = "Exception" }, -- For keywords related to debugging ["@keyword.exception"] = { link = "Exception" }, -- For exception related keywords. ["@keyword.conditional"] = { link = "Conditional" }, -- For keywords related to conditionnals. + ["@keyword.conditional.ternary"] = { link = "Operator" }, -- For ternary operators (e.g. `?` / `:`) ["@keyword.directive"] = { link = "PreProc" }, -- various preprocessor directives & shebangs ["@keyword.directive.define"] = { link = "Define" }, -- preprocessor definition directives @@ -86,11 +91,13 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- Comment ["@comment"] = { link = "Comment" }, + ["@comment.documentation"] = { link = "Comment" }, -- For comments documenting code ["@comment.error"] = { fg = C.base, bg = C.red }, ["@comment.warning"] = { fg = C.base, bg = C.yellow }, ["@comment.hint"] = { fg = C.base, bg = C.blue }, ["@comment.todo"] = { fg = C.base, bg = C.flamingo }, + ["@comment.note"] = { fg = C.base, bg = C.rosewater }, -- Markup ["@markup"] = { fg = C.text }, -- For strings considerated text in a markup language. @@ -102,10 +109,12 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@markup.heading"] = { fg = C.blue, style = { "bold" } }, -- titles like: # Example ["@markup.math"] = { fg = C.blue }, -- math environments (e.g. `$ ... $` in LaTeX) + ["@markup.quote"] = { fg = C.maroon, style = { "bold" } }, -- block quotes ["@markup.environment"] = { fg = C.pink }, -- text environments of markup languages ["@markup.environment.name"] = { fg = C.blue }, -- text indicating the type of an environment ["@markup.link"] = { link = "Tag" }, -- text references, footnotes, citations, etc. + ["@markup.link.label"] = { link = "Label" }, -- link, reference descriptions ["@markup.link.url"] = { fg = C.rosewater, style = { "italic", "underline" } }, -- urls, links and emails ["@markup.raw"] = { fg = C.teal }, -- used for inline code in markdown and for doc in python (""") @@ -235,6 +244,8 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci colors["@text.diff.add"] = colors["@diff.plus"] colors["@text.diff.delete"] = colors["@diff.minus"] + colors["@type.qualifier"] = colors["@keyword.modifier"] + colors["@keyword.storage"] = colors["@keyword.modifier"] colors["@define"] = colors["@keyword.directive.define"] colors["@preproc"] = colors["@keyword.directive"] colors["@storageclass"] = colors["@keyword.storage"] From fc98570d85ae772e56dc42cf8d7d6a497a909bdb Mon Sep 17 00:00:00 2001 From: Null Chilly Date: Sun, 14 Apr 2024 01:32:43 +0700 Subject: [PATCH 3/8] fix(flavour): g:catppuccin_flavour backwards compatibility --- lua/catppuccin/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 839e96d5..da9ecb66 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -150,7 +150,7 @@ function M.load(flavour) M.compile() f = assert(loadfile(compiled_path), "could not load cache") end - f(flavour or M.options.flavour) + f(flavour or M.options.flavour or vim.g.catppuccin_flavour) end ---@type fun(user_conf: CatppuccinOptions?) From a1439ad7c584efb3d0ce14ccb835967f030450fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 21:35:52 +0700 Subject: [PATCH 4/8] chore(main): release 1.7.0 (#644) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 838c8e90..b717dca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) From 30481d659b6524e6bcae0756201d737e5bc1f209 Mon Sep 17 00:00:00 2001 From: nkakouros Date: Sat, 4 May 2024 06:32:45 +0200 Subject: [PATCH 5/8] feat(integration): add colorful-winsep.nvim (#701) --- README.md | 17 +++++++++++++++++ doc/catppuccin.txt | 7 +++++++ .../groups/integrations/colorful_winsep.lua | 9 +++++++++ lua/catppuccin/init.lua | 4 ++++ lua/catppuccin/types.lua | 7 +++++++ 5 files changed, 44 insertions(+) create mode 100644 lua/catppuccin/groups/integrations/colorful_winsep.lua diff --git a/README.md b/README.md index b88b8d07..05d5f48c 100644 --- a/README.md +++ b/README.md @@ -458,6 +458,23 @@ native_lsp = { + + + + colorful-winsep.nvim + + + +```lua +colorful_winsep = { + enabled = false, + color = "red", +} +``` + + + + diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index a4a4f9d8..18de181d 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -343,6 +343,13 @@ coc.nvim>lua coc_nvim = false < +colorful-winsep>lua + colorful_winsep = { + enabled = false, + color = 'red' -- a catpuccin color to use for the window separator + }, +< + Special ~ Setting `enabled` to `true` enables this integration. diff --git a/lua/catppuccin/groups/integrations/colorful_winsep.lua b/lua/catppuccin/groups/integrations/colorful_winsep.lua new file mode 100644 index 00000000..d4d5f885 --- /dev/null +++ b/lua/catppuccin/groups/integrations/colorful_winsep.lua @@ -0,0 +1,9 @@ +local M = {} + +function M.get() + return { + NvimSeparator = { bg = C.base, fg = C[O.integrations.colorful_winsep.color] }, + } +end + +return M diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index da9ecb66..8c0db2de 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -96,6 +96,10 @@ local M = { enabled = true, color_mode = false, }, + colorful_winsep = { + enabled = false, + color = "red", + }, }, color_overrides = {}, highlight_overrides = {}, diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index 22da8abc..e876fc9d 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -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. @@ -210,6 +211,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 From 6af91673ceccbd6e073b66c439e7fce239f72d24 Mon Sep 17 00:00:00 2001 From: mrtnvgr Date: Sat, 4 May 2024 04:33:11 +0000 Subject: [PATCH 6/8] docs: auto generate vimdoc --- doc/catppuccin.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index 18de181d..fb8f27e8 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -343,13 +343,6 @@ coc.nvim>lua coc_nvim = false < -colorful-winsep>lua - colorful_winsep = { - enabled = false, - color = 'red' -- a catpuccin color to use for the window separator - }, -< - Special ~ Setting `enabled` to `true` enables this integration. @@ -386,6 +379,13 @@ directly at the thing (e.g. an error)). }, < +colorful-winsep.nvim>lua + colorful_winsep = { + enabled = false, + color = "red", + } +< + dashboard-nvim>lua dashboard = true < From 182f25640f85a3da2f1f22b088848d896a50fcce Mon Sep 17 00:00:00 2001 From: Mongkonchai Priyachiwa Date: Wed, 8 May 2024 18:26:50 +0700 Subject: [PATCH 7/8] feat(diffview): add diffview integrations (#700) * feat: add diffview integrations * chore: fix docs Documentation should have same value as in `init.lua` defaults :) * refactor: remove linked highlight --------- Co-authored-by: mrtnvgr --- README.md | 14 +++++++ doc/catppuccin.txt | 4 ++ .../groups/integrations/diffview.lua | 41 +++++++++++++++++++ lua/catppuccin/init.lua | 1 + lua/catppuccin/types.lua | 1 + 5 files changed, 61 insertions(+) create mode 100644 lua/catppuccin/groups/integrations/diffview.lua diff --git a/README.md b/README.md index 05d5f48c..afe32b39 100644 --- a/README.md +++ b/README.md @@ -489,6 +489,20 @@ dashboard = true + + + + diffview.nvim + + +```lua +diffview = false +``` + + + + + diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index fb8f27e8..4d27ec6e 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -390,6 +390,10 @@ dashboard-nvim>lua dashboard = true < +diffview.nvim>lua + diffview = false + + dropbar.nvim>lua dropbar = { enabled = false, diff --git a/lua/catppuccin/groups/integrations/diffview.lua b/lua/catppuccin/groups/integrations/diffview.lua new file mode 100644 index 00000000..b14b482d --- /dev/null +++ b/lua/catppuccin/groups/integrations/diffview.lua @@ -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 diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 8c0db2de..ad205f95 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -43,6 +43,7 @@ local M = { dap = true, dap_ui = true, dashboard = true, + diffview = false, flash = true, gitsigns = true, markdown = true, diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index e876fc9d..8b98a293 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -133,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: From d97387aea8264f484bb5d5e74f2182a06c83e0d8 Mon Sep 17 00:00:00 2001 From: mrtnvgr Date: Wed, 8 May 2024 11:27:12 +0000 Subject: [PATCH 8/8] docs: auto generate vimdoc --- doc/catppuccin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index 4d27ec6e..14d2276d 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -392,7 +392,7 @@ dashboard-nvim>lua diffview.nvim>lua diffview = false - +< dropbar.nvim>lua dropbar = {