refactor(nvim): update to support new kanagawa colors

This commit is contained in:
Price Hiller 2023-03-04 17:01:51 -06:00
parent f4bc4e5151
commit 03994c70ac
No known key found for this signature in database
3 changed files with 142 additions and 148 deletions

View File

@ -65,9 +65,12 @@ cmp.setup({
},
},
window = {
documentation = { side_padding = 0 },
documentation = {
side_padding = 0,
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
},
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
col_offset = -3,
side_padding = 0,
},
@ -80,7 +83,7 @@ cmp.setup({
end,
},
mapping = {
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs( -4), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
@ -97,8 +100,8 @@ cmp.setup({
end
end, { "i", "s" }),
["<C-S-Tab>"] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
if luasnip.jumpable( -1) then
luasnip.jump( -1)
else
fallback()
end
@ -113,8 +116,8 @@ cmp.setup({
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
elseif luasnip.jumpable( -1) then
luasnip.jump( -1)
else
fallback()
end

View File

@ -1,4 +1,3 @@
local colors = require("kanagawa.colors").setup({})
vim.opt.fillchars:append({
horiz = "",
horizup = "",
@ -8,17 +7,30 @@ vim.opt.fillchars:append({
vertright = "",
verthoriz = "",
})
require("kanagawa").setup({
transparent = true,
dim_inactive = true,
globalStatus = true,
overrides = {
NeogitHunkHeader = { bg = colors.diff.text },
NeogitHunkHeaderHighlight = { fg = colors.git.changed, bg = colors.diff.text },
NeogitDiffContextHighlight = { bg = colors.diff.change },
NeogitDiffDeleteHighlight = { fg = colors.git.removed, bg = colors.diff.delete },
NeogitDiffAddHighlight = { fg = colors.git.added, bg = colors.diff.add },
NeogitCommitViewHeader = { fg = colors.git.changed, bg = colors.diff.text },
theme = "dragon",
colors = {
theme = {
all = {
ui = {
bg_gutter = 'NONE'
}
}
}
},
overrides = function(palette)
local colors = palette.palette
local overrides = {
NeogitHunkHeader = { bg = colors.winterBlue },
NeogitHunkHeaderHighlight = { fg = colors.winterYellow, bg = colors.oldWhite },
NeogitDiffContextHighlight = { bg = colors.winterBlue },
NeogitDiffDeleteHighlight = { fg = colors.winterRed, bg = colors.autumnRed },
NeogitDiffAddHighlight = { fg = colors.winterGreen, bg = colors.autumnGreen },
NeogitCommitViewHeader = { fg = colors.winterYellow, bg = colors.autumnYellow },
menuSel = { bg = colors.sumiInk0, fg = "NONE" },
Pmenu = { fg = colors.fujiWhite, bg = colors.sumiInk2 },
CmpItemAbbrDeprecated = { fg = colors.fujiGray, bg = "NONE" },
@ -28,36 +40,28 @@ require("kanagawa").setup({
CmpItemKindField = { fg = colors.fujiWhite, bg = colors.sakuraPink },
CmpItemKindProperty = { fg = colors.fujiWhite, bg = colors.sakuraPink },
CmpItemKindEvent = { fg = colors.fujiWhite, bg = colors.sakuraPink },
CmpItemKindText = { fg = colors.fujiWhite, bg = colors.dragonBlue },
CmpItemKindEnum = { fg = colors.fujiWhite, bg = colors.crystalBlue },
CmpItemKindKeyword = { fg = colors.fujiWhite, bg = colors.springBlue },
CmpItemKindConstant = { fg = colors.fujiWhite, bg = colors.crystalBlue },
CmpItemKindConstructor = { fg = colors.fujiWhite, bg = colors.crystalBlue },
CmpItemKindReference = { fg = colors.fujiWhite, bg = colors.crystalBlue },
CmpItemKindFunction = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpItemKindStruct = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpItemKindClass = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpItemKindModule = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpItemKindOperator = { fg = colors.fujiWhite, bg = colors.oniViolet },
CmpItemKindVariable = { fg = colors.fujiWhite, bg = colors.roninYellow },
CmpItemKindFile = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpItemKindUnit = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpItemKindSnippet = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpItemKindFolder = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpItemKindMethod = { fg = colors.fujiWhite, bg = colors.autumnGreen },
CmpItemKindValue = { fg = colors.fujiWhite, bg = colors.autumnGreen },
CmpItemKindEnumMember = { fg = colors.fujiWhite, bg = colors.autumnGreen },
CmpItemKindInterface = { fg = colors.fujiWhite, bg = colors.waveRed },
CmpItemKindColor = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpItemKindTypeParameter = { fg = colors.fujiWhite, bg = colors.waveAqua2 },
CmpCustomSelectionBuffer = { fg = colors.fujiWhite, bg = colors.dragonBlue },
CmpCustomSelectionPath = { fg = colors.fujiWhite, bg = colors.autumnYellow },
CmpCustomSelectionCalculator = { fg = colors.fujiWhite, bg = colors.waveBlue2 },
@ -70,7 +74,6 @@ require("kanagawa").setup({
CmpCustomSelectionNpm = { fg = colors.fujiWhite, bg = colors.peachRed },
CmpCustomSelectionCommit = { fg = colors.fujiWhite, bg = colors.peachRed },
CmpCustomSelectionSpell = { fg = colors.fujiWhite, bg = colors.waveRed },
TelescopeNormal = { bg = colors.sumiInk1 },
TelescopeBorder = { bg = colors.sumiInk1, fg = colors.sumiInk1 },
TelescopePromptBorder = { bg = colors.sumiInk0, fg = colors.sumiInk0 },
@ -79,12 +82,9 @@ require("kanagawa").setup({
TelescopePreviewBorder = { bg = colors.sumiInk2, fg = colors.sumiInk2 },
TelescopePreviewNormal = { bg = colors.sumiInk2 },
TelescopeResultsTitle = { fg = "NONE", bg = "NONE" },
WinSeparator = { fg = colors.sumiInk4, bg = "NONE" },
MiniCursorword = { bg = colors.sumiInk3 },
MiniCursorwordCurrent = { bg = colors.sumiInk3 },
MiniCursorword = { bg = colors.waveBlue2 },
MiniCursorwordCurrent = { bg = colors.waveBlue2 },
rainbowcol1 = { fg = colors.oniViolet },
rainbowcol2 = { fg = colors.crystalBlue },
rainbowcol3 = { fg = colors.lightBlue },
@ -92,49 +92,39 @@ require("kanagawa").setup({
rainbowcol5 = { fg = colors.springGreen },
rainbowcol6 = { fg = colors.springViolet2 },
rainbowcol7 = { fg = colors.carpYellow },
packerSuccess = { fg = colors.autumnGreen, bg = "NONE" },
WinBar = { fg = colors.fujiWhite, bg = colors.sumiInk1b },
WinBarNC = { fg = colors.fujiWhite, bg = colors.sumiInk1b },
NeoTreeNormal = { bg = colors.sumiInk1b },
NeoTreeNormalNC = { bg = colors.sumiInk1b },
WinBar = { fg = colors.fujiWhite, bg = colors.sumiInk1 },
WinBarNC = { fg = colors.fujiWhite, bg = colors.sumiInk1 },
NeoTreeNormal = { bg = colors.sumiInk1 },
NeoTreeNormalNC = { bg = colors.sumiInk1 },
NoiceCmdlineIconCmdline = { fg = colors.oniViolet },
NoiceCmdlinePopupBorderCmdline = { fg = colors.oniViolet },
NoiceCmdlineIconFilter = { fg = colors.springGreen },
NoiceCmdlinePopupBorderFilter = { fg = colors.springGreen },
NoiceCmdLineIconLua = { fg = colors.crystalBlue },
NoiceCmdlinePopupBorderLua = { fg = colors.crystalBlue },
NoiceCmdlineIconHelp = { fg = colors.surimiOrange },
NoiceCmdlinePopupBorderHelp = { fg = colors.surimiOrange },
NoiceCmdLineIconSearch = { fg = colors.roninYellow },
NoiceCmdlinePopupBorderSearch = { fg = colors.roninYellow },
NoiceCmdlineIconIncRename = { fg = colors.peachRed },
NoiceCmdlinePopupdBorderIncRename = { fg = colors.peachRed },
Folded = { bg = colors.waveBlue1 },
UfoFoldedBg = { bg = "NONE" },
UfoFoldedBg = { bg = colors.waveBlue1 },
TSRainbowRed = { fg = colors.peachRed },
TSRainbowYellow = { fg = colors.carpYellow },
TSRainbowBlue = { fg = colors.crystalBlue },
TSRainbowGreen = { fg = colors.springGreen },
TSRainbowViolet = { fg = colors.oniViolet },
TSRainbowCyan = { fg = colors.lightBlue }
},
})
TSRainbowCyan = { fg = colors.lightBlue },
SmoothCursorCursor = { fg = colors.roninYellow },
SmoothCursorTrailBig1 = { fg = colors.autumnYellow },
SmoothCursorTrailBig2 = { fg = colors.crystalBlue },
SmoothCursorTrailMedium = { fg = colors.oniViolet },
SmoothCursorTrailSmall = { fg = colors.springBlue },
SmoothCursorTrailXSmall = { fg = colors.waveAqua2 }
}
-- NOTE: Colors for SmoothCursor
vim.api.nvim_set_hl(0, "SmoothCursorCursor", { fg = colors.roninYellow })
vim.api.nvim_set_hl(0, "SmoothCursorTrailBig1", { fg = colors.autumnYellow })
vim.api.nvim_set_hl(0, "SmoothCursorTrailBig2", { fg = colors.crystalBlue })
vim.api.nvim_set_hl(0, "SmoothCursorTrailMedium", { fg = colors.oniViolet })
vim.api.nvim_set_hl(0, "SmoothCursorTrailSmall", { fg = colors.springBlue })
vim.api.nvim_set_hl(0, "SmoothCursorTrailXSmall", { fg = colors.waveAqua2 })
return overrides
end,
})

View File

@ -60,6 +60,7 @@ lazy.setup({
config = function()
require("plugins.configs.kanagawa")
vim.cmd.colorscheme("kanagawa")
vim.schedule(vim.cmd.KanagawaCompile)
end,
},