Comments (3)
Hey, so I actually stumbled upon a pretty hacky but effective solution to this issue (and TBH, I'm kinda proud of myself for figuring it out, lol). Check it out:
custom_highlights = function(C)
local cmpfn = require("catppuccin.groups.integrations.cmp")
setfenv(cmpfn.get, { C = C })
local cmp = cmpfn.get()
for k, v in pairs(cmp) do
if k:sub(8, 11) == "Kind" then
cmp[k] = { bg = v.fg, fg = C.base }
end
end
cmp["Folded"] = { bg = C.crust }
return cmp
end
Basically, nothing to do manually any more. Anyway, thanks for the prompt response earlier. Closing this issue now.
from nvim.
It suppose that this commit removed global variables (C
, O
, U
) from scope of integrations
from nvim.
Hi, you used our internal module which wasn't documented! Indeed, it was introduced in 836de8b as a way to fix our function cache.
Unfortunately, fixing this will introduce more complexity for me.
On the bright side, it's pretty easy to vim golf this with :'<,'>s/fg/fg = C.base, bg
The snippet below should gives the same behavior:
custom_highlights = function(C)
return {
Folded = { bg = C.crust },
-- kind support
CmpItemKindSnippet = { fg = C.base, bg = C.mauve },
CmpItemKindKeyword = { fg = C.base, bg = C.red },
CmpItemKindText = { fg = C.base, bg = C.teal },
CmpItemKindMethod = { fg = C.base, bg = C.blue },
CmpItemKindConstructor = { fg = C.base, bg = C.blue },
CmpItemKindFunction = { fg = C.base, bg = C.blue },
CmpItemKindFolder = { fg = C.base, bg = C.blue },
CmpItemKindModule = { fg = C.base, bg = C.blue },
CmpItemKindConstant = { fg = C.base, bg = C.peach },
CmpItemKindField = { fg = C.base, bg = C.green },
CmpItemKindProperty = { fg = C.base, bg = C.green },
CmpItemKindEnum = { fg = C.base, bg = C.green },
CmpItemKindUnit = { fg = C.base, bg = C.green },
CmpItemKindClass = { fg = C.base, bg = C.yellow },
CmpItemKindVariable = { fg = C.base, bg = C.flamingo },
CmpItemKindFile = { fg = C.base, bg = C.blue },
CmpItemKindInterface = { fg = C.base, bg = C.yellow },
CmpItemKindColor = { fg = C.base, bg = C.red },
CmpItemKindReference = { fg = C.base, bg = C.red },
CmpItemKindEnumMember = { fg = C.base, bg = C.red },
CmpItemKindStruct = { fg = C.base, bg = C.blue },
CmpItemKindValue = { fg = C.base, bg = C.peach },
CmpItemKindEvent = { fg = C.base, bg = C.blue },
CmpItemKindOperator = { fg = C.base, bg = C.blue },
CmpItemKindTypeParameter = { fg = C.base, bg = C.blue },
CmpItemKindCopilot = { fg = C.base, bg = C.teal },
}
end
from nvim.
Related Issues (20)
- bug: black screen and small delay when opening a python file HOT 3
- 836de8b breaks using LSP colors in the custom_highlights HOT 1
- NeoTree background does not blend with the WinSeparator as shown in README screenshots. HOT 5
- React (JSX) code does not show different colors for variables. HOT 3
- Additional dim_inactive option for transparent setups
- Comments and Virtual Text same color HOT 3
- Semantic Highlighting - basedpyright HOT 6
- background variable not detected correctly on boot HOT 7
- Treesitter context highlighting when transparent_background=true HOT 3
- (option to) Disable all integrations by default HOT 1
- Incorrect typing for `illuminate` integration
- add tabby.nvim integration (colors) HOT 1
- Incorrect Typescript keyword color with TreeSitter enabled HOT 2
- Bufferline background breaks when Catppuccin is set to transparent background and bufferline style is styled as non-default HOT 3
- nvim-navbuddy integration
- Publish plugin on luarocks
- Lualine highlight color is not uniform
- lazy.nvim: module 'catppuccin.groups.integrations.colorful_winsep' HOT 2
- Add support for `mini.statusline` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim.