Update generated nvim config
This commit is contained in:
@ -0,0 +1 @@
|
|||||||
|
return { 'plugin_2/lua/plug_2.lua' }
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
_G.plugin_log = _G.plugin_log or {}
|
||||||
|
table.insert(_G.plugin_log, 'plugin/plug_2.lua')
|
||||||
22
config/neovim/store/lazy-plugins/promise-async/.github/colorscheme/catppuccin.vim
vendored
Normal file
22
config/neovim/store/lazy-plugins/promise-async/.github/colorscheme/catppuccin.vim
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')
|
||||||
|
|
||||||
|
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
|
||||||
|
let s:p.normal.left = [ [ s:c.mantle, s:c.blue ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.normal.middle = [ [ s:c.blue, s:c.mantle ] ]
|
||||||
|
let s:p.normal.right = [ [ s:c.overlay0, s:c.base ], [ s:c.blue, s:c.surface0 ] ]
|
||||||
|
let s:p.insert.left = [ [ s:c.mantle, s:c.teal ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.visual.left = [ [ s:c.mantle, s:c.mauve ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.replace.left = [ [ s:c.mantle, s:c.red ], [ s:c.blue, s:c.base ] ]
|
||||||
|
|
||||||
|
let s:p.inactive.left = [ [ s:c.blue, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
let s:p.inactive.middle = [ [ s:c.surface1, s:c.base ] ]
|
||||||
|
let s:p.inactive.right = [ [ s:c.surface1, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
|
||||||
|
let s:p.tabline.left = [ [ s:c.overlay0, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
let s:p.tabline.tabsel = [ [ s:c.blue, s:c.surface1 ], [ s:c.overlay0, s:c.base] ]
|
||||||
|
let s:p.tabline.middle = [ [ s:c.surface1, s:c.base ] ]
|
||||||
|
let s:p.tabline.right = copy(s:p.inactive.right)
|
||||||
|
let s:p.normal.error = [ [ s:c.mantle, s:c.red ] ]
|
||||||
|
let s:p.normal.warning = [ [ s:c.mantle, s:c.yellow ] ]
|
||||||
|
|
||||||
|
let g:lightline#colorscheme#catppuccin#palette = lightline#colorscheme#fill(s:p)
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "frappe"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "latte"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "macchiato"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "mocha"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue"()
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
ColorColumn = { bg = C.surface0 }, -- used for the columns set with 'colorcolumn'
|
||||||
|
Conceal = { fg = C.overlay1 }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
||||||
|
Cursor = { fg = C.base, bg = C.text }, -- character under the cursor
|
||||||
|
lCursor = { fg = C.base, bg = C.text }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
|
||||||
|
CursorIM = { fg = C.base, bg = C.text }, -- like Cursor, but used when in IME mode |CursorIM|
|
||||||
|
CursorColumn = { bg = C.mantle }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||||
|
CursorLine = {
|
||||||
|
bg = U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)),
|
||||||
|
}, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if forecrust (ctermfg OR guifg) is not set.
|
||||||
|
Directory = { fg = C.blue }, -- directory names (and other special names in listings)
|
||||||
|
EndOfBuffer = { fg = O.show_end_of_buffer and C.surface1 or C.base }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
||||||
|
ErrorMsg = { fg = C.red, style = { "bold", "italic" } }, -- error messages on the command line
|
||||||
|
VertSplit = { fg = O.transparent_background and C.surface1 or C.crust }, -- the column separating vertically split windows
|
||||||
|
Folded = { fg = C.blue, bg = O.transparent_background and C.none or C.surface1 }, -- line used for closed folds
|
||||||
|
FoldColumn = { fg = C.overlay0 }, -- 'foldcolumn'
|
||||||
|
SignColumn = { fg = C.surface1 }, -- column where |signs| are displayed
|
||||||
|
SignColumnSB = { bg = C.crust, fg = C.surface1 }, -- column where |signs| are displayed
|
||||||
|
Substitute = { bg = C.surface1, fg = U.vary_color({ latte = C.red }, C.pink) }, -- |:substitute| replacement text highlighting
|
||||||
|
LineNr = { fg = C.surface1 }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||||
|
CursorLineNr = { fg = C.lavender }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. highlights the number in numberline.
|
||||||
|
MatchParen = { fg = C.peach, bg = C.surface1, style = { "bold" } }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
|
||||||
|
ModeMsg = { fg = C.text, style = { "bold" } }, -- 'showmode' message (e.g., "-- INSERT -- ")
|
||||||
|
-- MsgArea = { fg = C.text }, -- Area for messages and cmdline, don't set this highlight because of https://github.com/neovim/neovim/issues/17832
|
||||||
|
MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display'
|
||||||
|
MoreMsg = { fg = C.blue }, -- |more-prompt|
|
||||||
|
NonText = { fg = C.overlay0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
|
||||||
|
Normal = { fg = C.text, bg = O.transparent_background and C.none or C.base }, -- normal text
|
||||||
|
NormalNC = {
|
||||||
|
fg = C.text,
|
||||||
|
bg = (O.transparent_background and O.dim_inactive.enabled and C.dim)
|
||||||
|
or (O.dim_inactive.enabled and C.dim)
|
||||||
|
or (O.transparent_background and C.none)
|
||||||
|
or C.base,
|
||||||
|
}, -- normal text in non-current windows
|
||||||
|
NormalSB = { fg = C.text, bg = C.crust }, -- normal text in non-current windows
|
||||||
|
NormalFloat = { fg = C.text, bg = (O.transparent_background and vim.o.winblend == 0) and C.none or C.mantle }, -- Normal text in floating windows.
|
||||||
|
FloatBorder = { fg = C.blue },
|
||||||
|
FloatTitle = { fg = C.subtext0 }, -- Title of floating windows
|
||||||
|
Pmenu = {
|
||||||
|
bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or U.darken(C.surface0, 0.8, C.crust),
|
||||||
|
fg = C.overlay2,
|
||||||
|
}, -- Popup menu: normal item.
|
||||||
|
PmenuSel = { bg = C.surface1, style = { "bold" } }, -- Popup menu: selected item.
|
||||||
|
PmenuSbar = { bg = C.surface1 }, -- Popup menu: scrollbar.
|
||||||
|
PmenuThumb = { bg = C.overlay0 }, -- Popup menu: Thumb of the scrollbar.
|
||||||
|
Question = { fg = C.blue }, -- |hit-enter| prompt and yes/no questions
|
||||||
|
QuickFixLine = { bg = C.surface1, style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
|
||||||
|
Search = { bg = U.darken(C.sky, 0.30, C.base), fg = C.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||||
|
IncSearch = { bg = U.darken(C.sky, 0.90, C.base), fg = C.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||||
|
CurSearch = { bg = C.red, fg = C.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently
|
||||||
|
SpecialKey = { link = "NonText" }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace|
|
||||||
|
SpellBad = { sp = C.red, style = { "undercurl" } }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellCap = { sp = C.yellow, style = { "undercurl" } }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellLocal = { sp = C.blue, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellRare = { sp = C.green, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
|
||||||
|
StatusLine = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, -- status line of current window
|
||||||
|
StatusLineNC = { fg = C.surface1, bg = O.transparent_background and C.none or C.mantle }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
|
||||||
|
TabLine = { bg = C.mantle, fg = C.surface1 }, -- tab pages line, not active tab page label
|
||||||
|
TabLineFill = {}, -- tab pages line, where there are no labels
|
||||||
|
TabLineSel = { fg = C.green, bg = C.surface1 }, -- tab pages line, active tab page label
|
||||||
|
Title = { fg = C.blue, style = { "bold" } }, -- titles for output from ":set all", ":autocmd" etc.
|
||||||
|
Visual = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection
|
||||||
|
VisualNOS = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection when vim is "Not Owning the Selection".
|
||||||
|
WarningMsg = { fg = C.yellow }, -- warning messages
|
||||||
|
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
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
MarkdownTask = { fg = C.teal, style = { "bold" } },
|
||||||
|
MarkdownTodo = { fg = C.flamingo, style = { "bold" } },
|
||||||
|
MarkdownNote = { fg = C.red, style = { "bold" } },
|
||||||
|
MarkdownSee = { fg = C.blue, style = { "bold" } },
|
||||||
|
MarkdownCheck = { fg = C.green, style = { "bold" } },
|
||||||
|
MarkdownURL = { fg = C.lavender, style = { "bold" } },
|
||||||
|
MarkdownExample = { fg = C.mauve, style = { "bold" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
AerialLine = { fg = C.yellow, bg = C.none },
|
||||||
|
AerialGuide = { fg = C.overlay2 },
|
||||||
|
AerialBooleanIcon = { link = "@boolean" },
|
||||||
|
AerialClassIcon = { link = "@type" },
|
||||||
|
AerialConstantIcon = { link = "@constant" },
|
||||||
|
AerialConstructorIcon = { link = "@constructor" },
|
||||||
|
AerialFieldIcon = { link = "@field" },
|
||||||
|
AerialFunctionIcon = { link = "@function" },
|
||||||
|
AerialMethodIcon = { link = "@method" },
|
||||||
|
AerialNamespaceIcon = { link = "@namespace" },
|
||||||
|
AerialNumberIcon = { link = "@number" },
|
||||||
|
AerialOperatorIcon = { link = "@operator" },
|
||||||
|
AerialTypeParameterIcon = { link = "@type" },
|
||||||
|
AerialPropertyIcon = { link = "@property" },
|
||||||
|
AerialStringIcon = { link = "@string" },
|
||||||
|
AerialVariableIcon = { link = "@constant" },
|
||||||
|
AerialEnumMemberIcon = { link = "@field" },
|
||||||
|
AerialEnumIcon = { link = "@type" },
|
||||||
|
AerialFileIcon = { link = "@text.uri" },
|
||||||
|
AerialModuleIcon = { link = "@namespace" },
|
||||||
|
AerialPackageIcon = { link = "@namespace" },
|
||||||
|
AerialInterfaceIcon = { link = "@type" },
|
||||||
|
AerialStructIcon = { link = "@type" },
|
||||||
|
AerialEventIcon = { link = "@type" },
|
||||||
|
AerialArrayIcon = { link = "@constant" },
|
||||||
|
AerialObjectIcon = { link = "@type" },
|
||||||
|
AerialKeyIcon = { link = "@type" },
|
||||||
|
AerialNullIcon = { link = "@type" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
AlphaShortcut = { fg = C.green },
|
||||||
|
AlphaHeader = { fg = C.blue },
|
||||||
|
AlphaHeaderLabel = { fg = C.peach },
|
||||||
|
AlphaButtons = { fg = C.lavender },
|
||||||
|
AlphaFooter = { fg = C.yellow, style = { "italic" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
BufferCurrent = { bg = C.surface1, fg = C.text },
|
||||||
|
BufferCurrentIndex = { bg = C.surface1, fg = C.blue },
|
||||||
|
BufferCurrentMod = { bg = C.surface1, fg = C.yellow },
|
||||||
|
BufferCurrentSign = { bg = C.surface1, fg = C.blue },
|
||||||
|
BufferCurrentTarget = { bg = C.surface1, fg = C.red },
|
||||||
|
BufferVisible = { bg = C.mantle, fg = C.text },
|
||||||
|
BufferVisibleIndex = { bg = C.mantle, fg = C.blue },
|
||||||
|
BufferVisibleMod = { bg = C.mantle, fg = C.yellow },
|
||||||
|
BufferVisibleSign = { bg = C.mantle, fg = C.blue },
|
||||||
|
BufferVisibleTarget = { bg = C.mantle, fg = C.red },
|
||||||
|
BufferInactive = { bg = C.mantle, fg = C.overlay0 },
|
||||||
|
BufferInactiveIndex = { bg = C.mantle, fg = C.overlay0 },
|
||||||
|
BufferInactiveMod = { bg = C.mantle, fg = C.yellow },
|
||||||
|
BufferInactiveSign = { bg = C.mantle, fg = C.blue },
|
||||||
|
BufferInactiveTarget = { bg = C.mantle, fg = C.red },
|
||||||
|
BufferTabpages = { bg = C.mantle, fg = C.none },
|
||||||
|
BufferTabpage = { bg = C.mantle, fg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
Beacon = { bg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
local M = {}
|
||||||
|
local ctp = require "catppuccin"
|
||||||
|
local O = ctp.options
|
||||||
|
|
||||||
|
function M.get(user_config)
|
||||||
|
user_config = user_config or {}
|
||||||
|
-- Backward compatibility
|
||||||
|
if O.integrations.bufferline then return {} end
|
||||||
|
return function()
|
||||||
|
local C = require("catppuccin.palettes").get_palette()
|
||||||
|
local transparent_background = O.transparent_background
|
||||||
|
local bg_highlight = (transparent_background and O.dim_inactive.enabled and C.dim)
|
||||||
|
or (transparent_background and "NONE")
|
||||||
|
or (O.dim_inactive.enabled and C.dim)
|
||||||
|
or C.crust
|
||||||
|
|
||||||
|
local active_bg = transparent_background and "NONE" or C.base
|
||||||
|
local inactive_bg = transparent_background and "NONE" or C.mantle
|
||||||
|
|
||||||
|
local separator_fg = O.transparent_background and C.surface1 or C.crust
|
||||||
|
|
||||||
|
local styles = user_config.styles or { "bold", "italic" }
|
||||||
|
|
||||||
|
local highlights = {
|
||||||
|
-- buffers
|
||||||
|
background = { bg = inactive_bg },
|
||||||
|
buffer_visible = { fg = C.surface1, bg = inactive_bg },
|
||||||
|
buffer_selected = { fg = C.text, bg = active_bg, style = styles }, -- current
|
||||||
|
-- Duplicate
|
||||||
|
duplicate_selected = { fg = C.text, bg = active_bg, style = styles },
|
||||||
|
duplicate_visible = { fg = C.surface1, bg = inactive_bg, style = styles },
|
||||||
|
duplicate = { fg = C.surface1, bg = inactive_bg, style = styles },
|
||||||
|
-- tabs
|
||||||
|
tab = { fg = C.surface1, bg = inactive_bg },
|
||||||
|
tab_selected = { fg = C.sky, bg = active_bg, bold = true },
|
||||||
|
tab_separator = { fg = separator_fg, bg = inactive_bg },
|
||||||
|
tab_separator_selected = { fg = separator_fg, bg = active_bg },
|
||||||
|
|
||||||
|
tab_close = { fg = C.red, bg = inactive_bg },
|
||||||
|
indicator_selected = { fg = C.peach, bg = active_bg, style = styles },
|
||||||
|
-- separators
|
||||||
|
separator = { fg = separator_fg, bg = inactive_bg },
|
||||||
|
separator_visible = { fg = separator_fg, bg = inactive_bg },
|
||||||
|
separator_selected = { fg = separator_fg, bg = active_bg },
|
||||||
|
offset_separator = { fg = separator_fg, bg = active_bg },
|
||||||
|
-- close buttons
|
||||||
|
close_button = { fg = C.surface1, bg = inactive_bg },
|
||||||
|
close_button_visible = { fg = C.surface1, bg = inactive_bg },
|
||||||
|
close_button_selected = { fg = C.red, bg = active_bg },
|
||||||
|
-- Empty fill
|
||||||
|
fill = { bg = bg_highlight },
|
||||||
|
-- Numbers
|
||||||
|
numbers = { fg = C.subtext0, bg = inactive_bg },
|
||||||
|
numbers_visible = { fg = C.subtext0, bg = inactive_bg },
|
||||||
|
numbers_selected = { fg = C.subtext0, bg = active_bg, style = styles },
|
||||||
|
-- Errors
|
||||||
|
error = { fg = C.red, bg = inactive_bg },
|
||||||
|
error_visible = { fg = C.red, bg = inactive_bg },
|
||||||
|
error_selected = { fg = C.red, bg = active_bg, style = styles },
|
||||||
|
error_diagnostic = { fg = C.red, bg = inactive_bg },
|
||||||
|
error_diagnostic_visible = { fg = C.red, bg = inactive_bg },
|
||||||
|
error_diagnostic_selected = { fg = C.red, bg = active_bg },
|
||||||
|
-- Warnings
|
||||||
|
warning = { fg = C.yellow, bg = inactive_bg },
|
||||||
|
warning_visible = { fg = C.yellow, bg = inactive_bg },
|
||||||
|
warning_selected = { fg = C.yellow, bg = active_bg, style = styles },
|
||||||
|
warning_diagnostic = { fg = C.yellow, bg = inactive_bg },
|
||||||
|
warning_diagnostic_visible = { fg = C.yellow, bg = inactive_bg },
|
||||||
|
warning_diagnostic_selected = { fg = C.yellow, bg = active_bg },
|
||||||
|
-- Infos
|
||||||
|
info = { fg = C.sky, bg = inactive_bg },
|
||||||
|
info_visible = { fg = C.sky, bg = inactive_bg },
|
||||||
|
info_selected = { fg = C.sky, bg = active_bg, style = styles },
|
||||||
|
info_diagnostic = { fg = C.sky, bg = inactive_bg },
|
||||||
|
info_diagnostic_visible = { fg = C.sky, bg = inactive_bg },
|
||||||
|
info_diagnostic_selected = { fg = C.sky, bg = active_bg },
|
||||||
|
-- Hint
|
||||||
|
hint = { fg = C.teal, bg = inactive_bg },
|
||||||
|
hint_visible = { fg = C.teal, bg = inactive_bg },
|
||||||
|
hint_selected = { fg = C.teal, bg = active_bg, style = styles },
|
||||||
|
hint_diagnostic = { fg = C.teal, bg = inactive_bg },
|
||||||
|
hint_diagnostic_visible = { fg = C.teal, bg = inactive_bg },
|
||||||
|
hint_diagnostic_selected = { fg = C.teal, bg = active_bg },
|
||||||
|
-- Diagnostics
|
||||||
|
diagnostic = { fg = C.subtext0, bg = inactive_bg },
|
||||||
|
diagnostic_visible = { fg = C.subtext0, bg = inactive_bg },
|
||||||
|
diagnostic_selected = { fg = C.subtext0, bg = active_bg, style = styles },
|
||||||
|
-- Modified
|
||||||
|
modified = { fg = C.peach, bg = inactive_bg },
|
||||||
|
modified_selected = { fg = C.peach, bg = active_bg },
|
||||||
|
}
|
||||||
|
|
||||||
|
local user_highlights = user_config.custom or {}
|
||||||
|
highlights =
|
||||||
|
vim.tbl_deep_extend("keep", user_highlights[ctp.flavour] or {}, user_highlights.all or {}, highlights)
|
||||||
|
|
||||||
|
for _, color in pairs(highlights) do
|
||||||
|
-- Because default is gui=bold,italic
|
||||||
|
color.italic = false
|
||||||
|
color.bold = false
|
||||||
|
|
||||||
|
if color.style then
|
||||||
|
for _, style in pairs(color.style) do
|
||||||
|
color[style] = true
|
||||||
|
if O.no_italic and style == "italic" then color[style] = false end
|
||||||
|
if O.no_bold and style == "bold" then color[style] = false end
|
||||||
|
if O.no_underline and style == "underline" then color[style] = false end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
color.style = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return highlights
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
CmpItemAbbr = { fg = C.overlay2 },
|
||||||
|
CmpItemAbbrDeprecated = { fg = C.overlay0, style = { "strikethrough" } },
|
||||||
|
CmpItemKind = { fg = C.blue },
|
||||||
|
CmpItemMenu = { fg = C.text },
|
||||||
|
CmpItemAbbrMatch = { fg = C.text, style = { "bold" } },
|
||||||
|
CmpItemAbbrMatchFuzzy = { fg = C.text, style = { "bold" } },
|
||||||
|
|
||||||
|
-- kind support
|
||||||
|
CmpItemKindSnippet = { fg = C.mauve },
|
||||||
|
CmpItemKindKeyword = { fg = C.red },
|
||||||
|
CmpItemKindText = { fg = C.teal },
|
||||||
|
CmpItemKindMethod = { fg = C.blue },
|
||||||
|
CmpItemKindConstructor = { fg = C.blue },
|
||||||
|
CmpItemKindFunction = { fg = C.blue },
|
||||||
|
CmpItemKindFolder = { fg = C.blue },
|
||||||
|
CmpItemKindModule = { fg = C.blue },
|
||||||
|
CmpItemKindConstant = { fg = C.peach },
|
||||||
|
CmpItemKindField = { fg = C.green },
|
||||||
|
CmpItemKindProperty = { fg = C.green },
|
||||||
|
CmpItemKindEnum = { fg = C.green },
|
||||||
|
CmpItemKindUnit = { fg = C.green },
|
||||||
|
CmpItemKindClass = { fg = C.yellow },
|
||||||
|
CmpItemKindVariable = { fg = C.flamingo },
|
||||||
|
CmpItemKindFile = { fg = C.blue },
|
||||||
|
CmpItemKindInterface = { fg = C.yellow },
|
||||||
|
CmpItemKindColor = { fg = C.red },
|
||||||
|
CmpItemKindReference = { fg = C.red },
|
||||||
|
CmpItemKindEnumMember = { fg = C.red },
|
||||||
|
CmpItemKindStruct = { fg = C.blue },
|
||||||
|
CmpItemKindValue = { fg = C.peach },
|
||||||
|
CmpItemKindEvent = { fg = C.blue },
|
||||||
|
CmpItemKindOperator = { fg = C.blue },
|
||||||
|
CmpItemKindTypeParameter = { fg = C.blue },
|
||||||
|
CmpItemKindCopilot = { fg = C.teal },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
-- These groups are for the coc.nvim, see ":h coc-highlights"
|
||||||
|
-- Custom popup menu since coc v0.0.82
|
||||||
|
CocMenuSel = { link = "PmenuSel" },
|
||||||
|
CocPumSearch = { fg = C.sky, style = { "bold" } },
|
||||||
|
|
||||||
|
-- Inlay hints
|
||||||
|
CocInlayHint = {
|
||||||
|
-- fg of `Comment`
|
||||||
|
fg = C.overlay0,
|
||||||
|
style = { "italic" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NvimSeparator = { bg = C.base, fg = C[O.integrations.colorful_winsep.color] },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
DapBreakpoint = { fg = C.red },
|
||||||
|
DapBreakpointCondition = { fg = C.yellow },
|
||||||
|
DapBreakpointRejected = { fg = C.mauve },
|
||||||
|
DapLogPoint = { fg = C.sky },
|
||||||
|
DapStopped = { fg = C.maroon },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
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 },
|
||||||
|
|
||||||
|
DapUIWinSelect = { fg = C.peach },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
DashboardShortCut = { fg = C.pink },
|
||||||
|
DashboardHeader = { fg = C.blue },
|
||||||
|
DashboardCenter = { fg = C.green },
|
||||||
|
DashboardFooter = { fg = C.yellow, style = { "italic" } },
|
||||||
|
DashboardMruTitle = { fg = C.sky },
|
||||||
|
DashboardProjectTitle = { fg = C.sky },
|
||||||
|
DashboardFiles = { fg = C.lavender },
|
||||||
|
DashboardKey = { fg = C.peach },
|
||||||
|
DashboardDesc = { fg = C.blue },
|
||||||
|
DashboardIcon = { fg = C.pink, bold = true },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -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
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local color = O.integrations.dropbar.color_mode
|
||||||
|
return {
|
||||||
|
DropBarMenuHoverEntry = { link = "Visual" },
|
||||||
|
DropBarMenuHoverIcon = { reverse = true },
|
||||||
|
DropBarMenuHoverSymbol = { bold = true },
|
||||||
|
DropBarIconUISeparator = { fg = C.overlay1 },
|
||||||
|
DropBarKindArray = color and { link = "DropBarIconKindArray" } or { fg = C.text },
|
||||||
|
DropBarKindBoolean = color and { link = "DropBarIconKindBoolean" } or { fg = C.text },
|
||||||
|
DropBarKindBreakStatement = color and { link = "DropBarIconKindBreakStatement" } or { fg = C.text },
|
||||||
|
DropBarKindCall = color and { link = "DropBarIconKindCall" } or { fg = C.text },
|
||||||
|
DropBarKindCaseStatement = color and { link = "DropBarIconKindCaseStatement" } or { fg = C.text },
|
||||||
|
DropBarKindClass = color and { link = "DropBarIconKindClass" } or { fg = C.text },
|
||||||
|
DropBarKindConstant = color and { link = "DropBarIconKindConstant" } or { fg = C.text },
|
||||||
|
DropBarKindConstructor = color and { link = "DropBarIconKindConstructor" } or { fg = C.text },
|
||||||
|
DropBarKindContinueStatement = color and { link = "DropBarIconKindContinueStatement" } or { fg = C.text },
|
||||||
|
DropBarKindDeclaration = color and { link = "DropBarIconKindDeclaration" } or { fg = C.text },
|
||||||
|
DropBarKindDelete = color and { link = "DropBarIconKindDelete" } or { fg = C.text },
|
||||||
|
DropBarKindDoStatement = color and { link = "DropBarIconKindDoStatement" } or { fg = C.text },
|
||||||
|
DropBarKindElseStatement = color and { link = "DropBarIconKindElseStatement" } or { fg = C.text },
|
||||||
|
DropBarKindEnum = color and { link = "DropBarIconKindEnum" } or { fg = C.text },
|
||||||
|
DropBarKindEnumMember = color and { link = "DropBarIconKindEnumMember" } or { fg = C.text },
|
||||||
|
DropBarKindEvent = color and { link = "DropBarIconKindEvent" } or { fg = C.text },
|
||||||
|
DropBarKindField = color and { link = "DropBarIconKindField" } or { fg = C.text },
|
||||||
|
DropBarKindFile = color and { link = "DropBarIconKindFile" } or { fg = C.text },
|
||||||
|
DropBarKindFolder = color and { link = "DropBarIconKindFolder" } or { fg = C.text },
|
||||||
|
DropBarKindForStatement = color and { link = "DropBarIconKindForStatement" } or { fg = C.text },
|
||||||
|
DropBarKindFunction = color and { link = "DropBarIconKindFunction" } or { fg = C.text },
|
||||||
|
DropBarKindIdentifier = color and { link = "DropBarIconKindIdentifier" } or { fg = C.text },
|
||||||
|
DropBarKindIfStatement = color and { link = "DropBarIconKindIfStatement" } or { fg = C.text },
|
||||||
|
DropBarKindInterface = color and { link = "DropBarIconKindInterface" } or { fg = C.text },
|
||||||
|
DropBarKindKeyword = color and { link = "DropBarIconKindKeyword" } or { fg = C.text },
|
||||||
|
DropBarKindList = color and { link = "DropBarIconKindList" } or { fg = C.text },
|
||||||
|
DropBarKindMacro = color and { link = "DropBarIconKindMacro" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH1 = color and { link = "DropBarIconKindMarkdownH1" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH2 = color and { link = "DropBarIconKindMarkdownH2" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH3 = color and { link = "DropBarIconKindMarkdownH3" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH4 = color and { link = "DropBarIconKindMarkdownH4" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH5 = color and { link = "DropBarIconKindMarkdownH5" } or { fg = C.text },
|
||||||
|
DropBarKindMarkdownH6 = color and { link = "DropBarIconKindMarkdownH6" } or { fg = C.text },
|
||||||
|
DropBarKindMethod = color and { link = "DropBarIconKindMethod" } or { fg = C.text },
|
||||||
|
DropBarKindModule = color and { link = "DropBarIconKindModule" } or { fg = C.text },
|
||||||
|
DropBarKindNamespace = color and { link = "DropBarIconKindNamespace" } or { fg = C.text },
|
||||||
|
DropBarKindNull = color and { link = "DropBarIconKindNull" } or { fg = C.text },
|
||||||
|
DropBarKindNumber = color and { link = "DropBarIconKindNumber" } or { fg = C.text },
|
||||||
|
DropBarKindObject = color and { link = "DropBarIconKindObject" } or { fg = C.text },
|
||||||
|
DropBarKindOperator = color and { link = "DropBarIconKindOperator" } or { fg = C.text },
|
||||||
|
DropBarKindPackage = color and { link = "DropBarIconKindPackage" } or { fg = C.text },
|
||||||
|
DropBarKindProperty = color and { link = "DropBarIconKindProperty" } or { fg = C.text },
|
||||||
|
DropBarKindReference = color and { link = "DropBarIconKindReference" } or { fg = C.text },
|
||||||
|
DropBarKindRepeat = color and { link = "DropBarIconKindRepeat" } or { fg = C.text },
|
||||||
|
DropBarKindScope = color and { link = "DropBarIconKindScope" } or { fg = C.text },
|
||||||
|
DropBarKindSpecifier = color and { link = "DropBarIconKindSpecifier" } or { fg = C.text },
|
||||||
|
DropBarKindStatement = color and { link = "DropBarIconKindStatement" } or { fg = C.text },
|
||||||
|
DropBarKindString = color and { link = "DropBarIconKindString" } or { fg = C.text },
|
||||||
|
DropBarKindStruct = color and { link = "DropBarIconKindStruct" } or { fg = C.text },
|
||||||
|
DropBarKindSwitchStatement = color and { link = "DropBarIconKindSwitchStatement" } or { fg = C.text },
|
||||||
|
DropBarKindType = color and { link = "DropBarIconKindType" } or { fg = C.text },
|
||||||
|
DropBarKindTypeParameter = color and { link = "DropBarIconKindTypeParameter" } or { fg = C.text },
|
||||||
|
DropBarKindUnit = color and { link = "DropBarIconKindUnit" } or { fg = C.text },
|
||||||
|
DropBarKindValue = color and { link = "DropBarIconKindValue" } or { fg = C.text },
|
||||||
|
DropBarKindVariable = color and { link = "DropBarIconKindVariable" } or { fg = C.text },
|
||||||
|
DropBarKindWhileStatement = color and { link = "DropBarIconKindWhileStatement" } or { fg = C.text },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,501 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local C = require("catppuccin.palettes").get_palette()
|
||||||
|
local lsp = require "feline.providers.lsp"
|
||||||
|
|
||||||
|
local assets = {
|
||||||
|
left_separator = "",
|
||||||
|
right_separator = "",
|
||||||
|
mode_icon = "",
|
||||||
|
dir = "",
|
||||||
|
file = "",
|
||||||
|
lsp = {
|
||||||
|
server = "",
|
||||||
|
error = "",
|
||||||
|
warning = "",
|
||||||
|
info = "",
|
||||||
|
hint = "",
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
branch = "",
|
||||||
|
added = "",
|
||||||
|
changed = "",
|
||||||
|
removed = "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local sett = {
|
||||||
|
text = C.mantle,
|
||||||
|
bkg = C.crust,
|
||||||
|
diffs = C.mauve,
|
||||||
|
extras = C.overlay1,
|
||||||
|
curr_file = C.maroon,
|
||||||
|
curr_dir = C.flamingo,
|
||||||
|
show_modified = false,
|
||||||
|
}
|
||||||
|
|
||||||
|
if require("catppuccin").flavour == "latte" then
|
||||||
|
local latte = require("catppuccin.palettes").get_palette "latte"
|
||||||
|
sett.text = latte.base
|
||||||
|
sett.bkg = latte.crust
|
||||||
|
end
|
||||||
|
|
||||||
|
if require("catppuccin").options.transparent_background then sett.bkg = "NONE" end
|
||||||
|
|
||||||
|
local mode_colors = {
|
||||||
|
["n"] = { "NORMAL", C.lavender },
|
||||||
|
["no"] = { "N-PENDING", C.lavender },
|
||||||
|
["i"] = { "INSERT", C.green },
|
||||||
|
["ic"] = { "INSERT", C.green },
|
||||||
|
["t"] = { "TERMINAL", C.green },
|
||||||
|
["v"] = { "VISUAL", C.flamingo },
|
||||||
|
["V"] = { "V-LINE", C.flamingo },
|
||||||
|
[""] = { "V-BLOCK", C.flamingo },
|
||||||
|
["R"] = { "REPLACE", C.maroon },
|
||||||
|
["Rv"] = { "V-REPLACE", C.maroon },
|
||||||
|
["s"] = { "SELECT", C.maroon },
|
||||||
|
["S"] = { "S-LINE", C.maroon },
|
||||||
|
[""] = { "S-BLOCK", C.maroon },
|
||||||
|
["c"] = { "COMMAND", C.peach },
|
||||||
|
["cv"] = { "COMMAND", C.peach },
|
||||||
|
["ce"] = { "COMMAND", C.peach },
|
||||||
|
["r"] = { "PROMPT", C.teal },
|
||||||
|
["rm"] = { "MORE", C.teal },
|
||||||
|
["r?"] = { "CONFIRM", C.mauve },
|
||||||
|
["!"] = { "SHELL", C.green },
|
||||||
|
}
|
||||||
|
|
||||||
|
local view = {
|
||||||
|
lsp = {
|
||||||
|
progress = true,
|
||||||
|
name = false,
|
||||||
|
exclude_lsp_names = {},
|
||||||
|
separator = "|",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local is_lsp_in_excluded_list = function(lsp_name)
|
||||||
|
for _, excluded_lsp in ipairs(view.lsp.exclude_lsp_names) do
|
||||||
|
if lsp_name == excluded_lsp then return true end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.setup(opts)
|
||||||
|
if opts then
|
||||||
|
opts.assets = opts.assets or {}
|
||||||
|
opts.sett = opts.sett or {}
|
||||||
|
opts.mode_colors = opts.mode_colors or {}
|
||||||
|
opts.view = opts.view or {}
|
||||||
|
else
|
||||||
|
opts = {
|
||||||
|
assets = {},
|
||||||
|
sett = {},
|
||||||
|
mode_colors = {},
|
||||||
|
view = {},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
assets = vim.tbl_deep_extend("force", assets, opts.assets)
|
||||||
|
sett = vim.tbl_deep_extend("force", sett, opts.sett)
|
||||||
|
mode_colors = vim.tbl_deep_extend("force", mode_colors, opts.mode_colors)
|
||||||
|
view = vim.tbl_deep_extend("force", view, opts.view)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local shortline = false
|
||||||
|
|
||||||
|
local components = {
|
||||||
|
active = { {}, {}, {} }, -- left, center, right
|
||||||
|
inactive = { {} },
|
||||||
|
}
|
||||||
|
|
||||||
|
local function is_enabled(min_width)
|
||||||
|
if shortline then return true end
|
||||||
|
|
||||||
|
return vim.api.nvim_win_get_width(0) > min_width
|
||||||
|
end
|
||||||
|
|
||||||
|
-- global components
|
||||||
|
local invi_sep = {
|
||||||
|
str = " ",
|
||||||
|
hl = {
|
||||||
|
fg = sett.bkg,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- helpers
|
||||||
|
local function any_git_changes()
|
||||||
|
local gst = vim.b.gitsigns_status_dict -- git stats
|
||||||
|
if gst then
|
||||||
|
if
|
||||||
|
gst["added"] and gst["added"] > 0
|
||||||
|
or gst["removed"] and gst["removed"] > 0
|
||||||
|
or gst["changed"] and gst["changed"] > 0
|
||||||
|
then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #################### STATUSLINE ->
|
||||||
|
|
||||||
|
-- ######## Left
|
||||||
|
|
||||||
|
-- Current vi mode ------>
|
||||||
|
local vi_mode_hl = function()
|
||||||
|
return {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = mode_colors[vim.fn.mode()][2],
|
||||||
|
style = "bold",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
components.active[1][1] = {
|
||||||
|
provider = " " .. assets.mode_icon .. " ",
|
||||||
|
hl = function()
|
||||||
|
return {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = mode_colors[vim.fn.mode()][2],
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[1][2] = {
|
||||||
|
provider = function() return mode_colors[vim.fn.mode()][1] .. " " end,
|
||||||
|
hl = vi_mode_hl,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- there is a dilemma: we need to hide Diffs if there is no git info. We can do that, but this will
|
||||||
|
-- leave the right_separator colored with purple, and since we can't change the color conditonally
|
||||||
|
-- then the solution is to create two right_separators: one with a mauve sett.bkg and the other one normal
|
||||||
|
-- sett.bkg; both have the same fg (vi mode). The mauve one appears if there is git info, else the one with
|
||||||
|
-- the normal sett.bkg appears. Fixed :)
|
||||||
|
|
||||||
|
-- enable if git diffs are not available
|
||||||
|
components.active[1][3] = {
|
||||||
|
provider = assets.right_separator,
|
||||||
|
hl = function()
|
||||||
|
return {
|
||||||
|
fg = mode_colors[vim.fn.mode()][2],
|
||||||
|
bg = sett.bkg,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
enabled = function() return not any_git_changes() end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- enable if git diffs are available
|
||||||
|
components.active[1][4] = {
|
||||||
|
provider = assets.right_separator,
|
||||||
|
hl = function()
|
||||||
|
return {
|
||||||
|
fg = mode_colors[vim.fn.mode()][2],
|
||||||
|
bg = sett.diffs,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
enabled = function() return any_git_changes() end,
|
||||||
|
}
|
||||||
|
-- Current vi mode ------>
|
||||||
|
|
||||||
|
-- Diffs ------>
|
||||||
|
components.active[1][5] = {
|
||||||
|
provider = "git_diff_added",
|
||||||
|
hl = {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = sett.diffs,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.git.added .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[1][6] = {
|
||||||
|
provider = "git_diff_changed",
|
||||||
|
hl = {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = sett.diffs,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.git.changed .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[1][7] = {
|
||||||
|
provider = "git_diff_removed",
|
||||||
|
hl = {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = sett.diffs,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.git.removed .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[1][8] = {
|
||||||
|
provider = " ",
|
||||||
|
hl = {
|
||||||
|
fg = sett.bkg,
|
||||||
|
bg = sett.diffs,
|
||||||
|
},
|
||||||
|
enabled = function() return any_git_changes() end,
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[1][9] = {
|
||||||
|
provider = assets.right_separator,
|
||||||
|
hl = {
|
||||||
|
fg = sett.diffs,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
enabled = function() return any_git_changes() end,
|
||||||
|
}
|
||||||
|
-- Diffs ------>
|
||||||
|
|
||||||
|
-- Extras ------>
|
||||||
|
|
||||||
|
-- file progress
|
||||||
|
components.active[1][10] = {
|
||||||
|
provider = function()
|
||||||
|
local current_line = vim.fn.line "."
|
||||||
|
local total_line = vim.fn.line "$"
|
||||||
|
|
||||||
|
if current_line == 1 then
|
||||||
|
return "Top"
|
||||||
|
elseif current_line == vim.fn.line "$" then
|
||||||
|
return "Bot"
|
||||||
|
end
|
||||||
|
local result, _ = math.modf((current_line / total_line) * 100)
|
||||||
|
return result .. "%%"
|
||||||
|
end,
|
||||||
|
-- enabled = shortline or function(winid)
|
||||||
|
-- return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
-- end,
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
left_sep = invi_sep,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- position
|
||||||
|
components.active[1][11] = {
|
||||||
|
provider = "position",
|
||||||
|
-- enabled = shortline or function(winid)
|
||||||
|
-- return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
-- end,
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
left_sep = invi_sep,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- macro
|
||||||
|
components.active[1][12] = {
|
||||||
|
provider = "macro",
|
||||||
|
enabled = function() return vim.api.nvim_get_option "cmdheight" == 0 end,
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
left_sep = invi_sep,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- search count
|
||||||
|
components.active[1][13] = {
|
||||||
|
provider = "search_count",
|
||||||
|
enabled = function() return vim.api.nvim_get_option "cmdheight" == 0 end,
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
left_sep = invi_sep,
|
||||||
|
}
|
||||||
|
-- Extras ------>
|
||||||
|
|
||||||
|
-- ######## Left
|
||||||
|
|
||||||
|
-- ######## Center
|
||||||
|
|
||||||
|
-- Diagnostics ------>
|
||||||
|
-- workspace loader
|
||||||
|
components.active[2][1] = {
|
||||||
|
provider = function()
|
||||||
|
if vim.lsp.status then return "" end
|
||||||
|
local Lsp = vim.lsp.util.get_progress_messages()[1]
|
||||||
|
|
||||||
|
if Lsp then
|
||||||
|
local msg = Lsp.message or ""
|
||||||
|
local percentage = Lsp.percentage
|
||||||
|
if not percentage then return "" end
|
||||||
|
local title = Lsp.title or ""
|
||||||
|
local spinners = {
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
}
|
||||||
|
local success_icon = {
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
}
|
||||||
|
local ms = vim.loop.hrtime() / 1000000
|
||||||
|
local frame = math.floor(ms / 120) % #spinners
|
||||||
|
|
||||||
|
if percentage >= 70 then
|
||||||
|
return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage)
|
||||||
|
end
|
||||||
|
|
||||||
|
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
|
||||||
|
end
|
||||||
|
|
||||||
|
return ""
|
||||||
|
end,
|
||||||
|
enabled = is_enabled(80) and view.lsp.progress == true,
|
||||||
|
hl = {
|
||||||
|
fg = C.rosewater,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- general diagnostics (errors, warnings. info and hints)
|
||||||
|
components.active[2][2] = {
|
||||||
|
provider = "diagnostic_errors",
|
||||||
|
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.ERROR) end,
|
||||||
|
|
||||||
|
hl = {
|
||||||
|
fg = C.red,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.lsp.error .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[2][3] = {
|
||||||
|
provider = "diagnostic_warnings",
|
||||||
|
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.WARN) end,
|
||||||
|
hl = {
|
||||||
|
fg = C.yellow,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.lsp.warning .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[2][4] = {
|
||||||
|
provider = "diagnostic_info",
|
||||||
|
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.INFO) end,
|
||||||
|
hl = {
|
||||||
|
fg = C.sky,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.lsp.info .. " ",
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[2][5] = {
|
||||||
|
provider = "diagnostic_hints",
|
||||||
|
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.HINT) end,
|
||||||
|
hl = {
|
||||||
|
fg = C.rosewater,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
icon = " " .. assets.lsp.hint .. " ",
|
||||||
|
}
|
||||||
|
-- Diagnostics ------>
|
||||||
|
|
||||||
|
-- ######## Center
|
||||||
|
|
||||||
|
-- ######## Right
|
||||||
|
|
||||||
|
components.active[3][1] = {
|
||||||
|
provider = "git_branch",
|
||||||
|
enabled = is_enabled(70),
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
icon = assets.git.branch .. " ",
|
||||||
|
right_sep = invi_sep,
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[3][2] = {
|
||||||
|
provider = function()
|
||||||
|
local active_clients = vim.lsp.get_active_clients { bufnr = 0 }
|
||||||
|
|
||||||
|
-- show an indicator that we have running lsps
|
||||||
|
if view.lsp.name == false and next(active_clients) ~= nil then return assets.lsp.server .. " " .. "Lsp" end
|
||||||
|
|
||||||
|
-- show the actual name of the runing lsps
|
||||||
|
local index = 0
|
||||||
|
local lsp_names = ""
|
||||||
|
for _, lsp_config in ipairs(active_clients) do
|
||||||
|
if is_lsp_in_excluded_list(lsp_config.name) then goto continue end
|
||||||
|
|
||||||
|
index = index + 1
|
||||||
|
if index == 1 then
|
||||||
|
lsp_names = assets.lsp.server .. " " .. lsp_config.name
|
||||||
|
else
|
||||||
|
lsp_names = lsp_names .. view.lsp.separator .. lsp_config.name
|
||||||
|
end
|
||||||
|
|
||||||
|
::continue::
|
||||||
|
end
|
||||||
|
|
||||||
|
return lsp_names
|
||||||
|
end,
|
||||||
|
|
||||||
|
hl = {
|
||||||
|
fg = sett.extras,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
|
||||||
|
right_sep = invi_sep,
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[3][3] = {
|
||||||
|
provider = function()
|
||||||
|
local filename = vim.fn.expand "%:t"
|
||||||
|
local extension = vim.fn.expand "%:e"
|
||||||
|
local present, icons = pcall(require, "nvim-web-devicons")
|
||||||
|
local icon = present and icons.get_icon(filename, extension) or assets.file
|
||||||
|
return (sett.show_modified and "%m" or "") .. " " .. icon .. " " .. filename .. " "
|
||||||
|
end,
|
||||||
|
enabled = is_enabled(70),
|
||||||
|
hl = {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = sett.curr_file,
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = assets.left_separator,
|
||||||
|
hl = {
|
||||||
|
fg = sett.curr_file,
|
||||||
|
bg = sett.bkg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
components.active[3][4] = {
|
||||||
|
provider = function()
|
||||||
|
local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
|
||||||
|
return " " .. assets.dir .. " " .. dir_name .. " "
|
||||||
|
end,
|
||||||
|
enabled = is_enabled(80),
|
||||||
|
hl = {
|
||||||
|
fg = sett.text,
|
||||||
|
bg = sett.curr_dir,
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = assets.left_separator,
|
||||||
|
hl = {
|
||||||
|
fg = sett.curr_dir,
|
||||||
|
bg = sett.curr_file,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- ######## Right
|
||||||
|
|
||||||
|
-- Inanctive components
|
||||||
|
components.inactive[1][1] = {
|
||||||
|
provider = function() return " " .. string.upper(vim.bo.ft) .. " " end,
|
||||||
|
hl = {
|
||||||
|
fg = C.overlay2,
|
||||||
|
bg = C.mantle,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return components
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
FernBranchText = { fg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
FidgetTask = {
|
||||||
|
bg = O.transparent_background and C.none or C.mantle,
|
||||||
|
fg = C.text,
|
||||||
|
},
|
||||||
|
FidgetTitle = { fg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local bg = O.transparent_background and C.none or C.base
|
||||||
|
return {
|
||||||
|
FlashBackdrop = { fg = C.overlay0 },
|
||||||
|
FlashLabel = { fg = C.green, bg = bg, style = { "bold" } },
|
||||||
|
FlashMatch = { fg = C.lavender, bg = bg },
|
||||||
|
FlashCurrent = { fg = C.peach, bg = bg },
|
||||||
|
FlashPrompt = { link = "NormalFloat" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
GitGutterAdd = { fg = C.green },
|
||||||
|
GitGutterChange = { fg = C.yellow },
|
||||||
|
GitGutterDelete = { fg = C.red },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
if type(O.integrations.gitsigns) == "boolean" then
|
||||||
|
O.integrations.gitsigns = { enabled = true, transparent = false }
|
||||||
|
end
|
||||||
|
|
||||||
|
if O.transparent_background then
|
||||||
|
return {
|
||||||
|
GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt|
|
||||||
|
GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt|
|
||||||
|
GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt|
|
||||||
|
|
||||||
|
GitSignsCurrentLineBlame = { fg = C.surface1 },
|
||||||
|
|
||||||
|
GitSignsAddPreview = O.transparent_background and { fg = U.darken(C.green, 0.72, C.base), bg = C.none }
|
||||||
|
or { link = "DiffAdd" },
|
||||||
|
GitSignsDeletePreview = O.transparent_background and { fg = U.darken(C.red, 0.72, C.base), bg = C.none }
|
||||||
|
or { link = "DiffDelete" },
|
||||||
|
-- for word diff in previews
|
||||||
|
GitSignsAddInline = O.transparent_background and {
|
||||||
|
fg = C.green,
|
||||||
|
bg = C.none,
|
||||||
|
style = { "bold" },
|
||||||
|
} or { link = "DiffAdd" },
|
||||||
|
GitSignsDeleteInline = O.transparent_background and {
|
||||||
|
fg = C.red,
|
||||||
|
bg = C.none,
|
||||||
|
style = { "bold" },
|
||||||
|
} or { link = "DiffDelete" },
|
||||||
|
GitSignsChangeInline = O.transparent_background and {
|
||||||
|
fg = C.yellow,
|
||||||
|
bg = C.none,
|
||||||
|
style = { "bold" },
|
||||||
|
} or { link = "DiffChange" },
|
||||||
|
|
||||||
|
GitSignsDeleteVirtLn = O.transparent_background and { bg = C.none, fg = C.red } or { link = "DiffDelete" },
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return {
|
||||||
|
GitSignsAdd = { fg = C.green }, -- diff mode: Added line |diff.txt|
|
||||||
|
GitSignsChange = { fg = C.yellow }, -- diff mode: Changed line |diff.txt|
|
||||||
|
GitSignsDelete = { fg = C.red }, -- diff mode: Deleted line |diff.txt|
|
||||||
|
|
||||||
|
GitSignsCurrentLineBlame = { fg = C.surface1 },
|
||||||
|
|
||||||
|
GitSignsAddPreview = O.transparent_background and { fg = C.green, bg = C.none } or { link = "DiffAdd" },
|
||||||
|
GitSignsDeletePreview = O.transparent_background and { fg = C.red, bg = C.none } or { link = "DiffDelete" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
HarpoonWindow = { fg = C.text, bg = O.transparent_background and C.none or C.base },
|
||||||
|
HarpoonBorder = { fg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
Dash = { fg = C.overlay2, style = { "bold" } },
|
||||||
|
Quote = { link = "@markup.strong" },
|
||||||
|
CodeBlock = { bg = C.mantle },
|
||||||
|
Headline = { link = "Headline1" },
|
||||||
|
Headline1 = { bg = C.surface0, fg = C.red },
|
||||||
|
Headline2 = { bg = C.surface0, fg = C.peach },
|
||||||
|
Headline3 = { bg = C.surface0, fg = C.yellow },
|
||||||
|
Headline4 = { bg = C.surface0, fg = C.green },
|
||||||
|
Headline5 = { bg = C.surface0, fg = C.sapphire },
|
||||||
|
Headline6 = { bg = C.surface0, fg = C.lavender },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local bg = O.transparent_background and C.none or C.base
|
||||||
|
return {
|
||||||
|
HopNextKey = { bg = bg, fg = C.peach, style = { "bold", "underline" } },
|
||||||
|
HopNextKey1 = { bg = bg, fg = C.blue, style = { "bold" } },
|
||||||
|
HopNextKey2 = { bg = bg, fg = C.teal, style = { "bold", "italic" } },
|
||||||
|
HopUnmatched = { bg = bg, fg = C.overlay0 },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
IlluminatedWordText = { bg = U.darken(C.surface1, 0.7, C.base) },
|
||||||
|
IlluminatedWordRead = { bg = U.darken(C.surface1, 0.7, C.base) },
|
||||||
|
IlluminatedWordWrite = {
|
||||||
|
bg = U.darken(C.surface1, 0.7, C.base),
|
||||||
|
style = O.integrations.illuminate.lsp and { "standout" } or {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local scope_color = O.integrations.indent_blankline.scope_color
|
||||||
|
|
||||||
|
local hi = {
|
||||||
|
IblIndent = { fg = C.surface0 },
|
||||||
|
IblScope = { fg = C[scope_color] or C.text },
|
||||||
|
}
|
||||||
|
|
||||||
|
if O.integrations.indent_blankline.colored_indent_levels then
|
||||||
|
hi["RainbowRed"] = { blend = 0, fg = C.red }
|
||||||
|
hi["RainbowYellow"] = { blend = 0, fg = C.yellow }
|
||||||
|
hi["RainbowBlue"] = { blend = 0, fg = C.blue }
|
||||||
|
hi["RainbowOrange"] = { blend = 0, fg = C.peach }
|
||||||
|
hi["RainbowGreen"] = { blend = 0, fg = C.green }
|
||||||
|
hi["RainbowViolet"] = { blend = 0, fg = C.mauve }
|
||||||
|
hi["RainbowCyan"] = { blend = 0, fg = C.teal }
|
||||||
|
end
|
||||||
|
|
||||||
|
return hi
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
LeapMatch = {
|
||||||
|
fg = O.transparent_background and C.pink or U.vary_color({ latte = "#222222" }, U.brighten(C.green, 0.3)),
|
||||||
|
style = { "underline", "nocombine", O.transparent_background and "bold" or nil },
|
||||||
|
},
|
||||||
|
LeapLabelPrimary = {
|
||||||
|
fg = O.transparent_background and C.green or U.vary_color({ latte = "#222222" }, C.base),
|
||||||
|
bg = O.transparent_background and C.none
|
||||||
|
or U.vary_color({ latte = U.brighten(C.red, 0.4) }, U.brighten(C.green, 0.3)),
|
||||||
|
style = { "nocombine", O.transparent_background and "bold" or nil },
|
||||||
|
},
|
||||||
|
LeapLabelSecondary = {
|
||||||
|
fg = O.transparent_background and C.blue or U.vary_color({ latte = "#222222" }, C.base),
|
||||||
|
bg = O.transparent_background and C.none or U.vary_color({ latte = U.brighten(C.sky, 0.3) }, C.sky),
|
||||||
|
style = { "nocombine", O.transparent_background and "bold" or nil },
|
||||||
|
},
|
||||||
|
LeapBackdrop = { fg = O.transparent_background and C.overlay0 or C.none },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
LightspeedLabel = { fg = C.red, style = { "bold", "underline" } },
|
||||||
|
LightspeedLabelDistant = {
|
||||||
|
fg = U.vary_color({ latte = C.blue }, C.sky),
|
||||||
|
style = { "bold", "underline" },
|
||||||
|
},
|
||||||
|
LightspeedShortcut = {
|
||||||
|
fg = "#ffffff",
|
||||||
|
bg = U.increase_saturation(C.red, 0.7),
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
LightspeedMaskedChar = {
|
||||||
|
fg = U.vary_color({ latte = U.lighten(C.pink, 0.7, C.text) }, U.darken(C.pink, 0.7, C.base)),
|
||||||
|
},
|
||||||
|
LightspeedUnlabeledMatch = { fg = C.text, style = { "bold" } },
|
||||||
|
LightspeedGreyWash = { link = "Comment" },
|
||||||
|
LightspeedUniqueChar = { link = "LightspeedUnlabeledMatch" },
|
||||||
|
LightspeedOneCharMatch = { link = "LightspeedShortcut" },
|
||||||
|
LightspeedPendingOpArea = { link = "IncSearch" },
|
||||||
|
LightspeedCursor = { link = "Cursor" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
SagaTitle = { fg = C.teal, style = { "bold" } },
|
||||||
|
SagaBorder = { fg = C.blue, bg = C.none },
|
||||||
|
SagaNormal = { bg = O.transparent_background and C.none or C.base },
|
||||||
|
SagaToggle = { fg = C.green },
|
||||||
|
SagaCount = { fg = C.overlay1 },
|
||||||
|
SagaBeacon = { bg = U.darken(C.surface0, 0.8, C.crust) },
|
||||||
|
SagaVirtLine = { fg = C.surface2 },
|
||||||
|
SagaSpinner = { fg = C.mauve, style = { "bold" } },
|
||||||
|
SagaSpinnerTitle = { fg = C.mauve, style = { "bold" } },
|
||||||
|
SagaText = { fg = C.text },
|
||||||
|
SagaSelect = { fg = C.blue, style = { "bold" } },
|
||||||
|
SagaSearch = { link = "Search" },
|
||||||
|
SagaFinderFname = { fg = C.subtext0, style = { "bold" } },
|
||||||
|
ActionFix = { fg = C.pink },
|
||||||
|
ActionPreviewTitle = { fg = C.mauve, bg = O.transparent_background and C.none or C.base },
|
||||||
|
CodeActionText = { fg = C.green },
|
||||||
|
CodeActionNumber = { fg = C.pink },
|
||||||
|
SagaImpIcon = { fg = C.pink },
|
||||||
|
SagaLightBulb = { link = "DiagnosticSignHint" },
|
||||||
|
RenameNormal = { fg = C.text },
|
||||||
|
RenameMatch = { link = "Search" },
|
||||||
|
DiagnosticText = { fg = C.text },
|
||||||
|
SagaWinbarSep = { fg = C.flamingo },
|
||||||
|
SagaDetail = { link = "Comment" },
|
||||||
|
SagaFileName = { fg = C.overlay2, style = { "bold" } },
|
||||||
|
SagaFolderName = { fg = C.overlay2, style = { "bold" } },
|
||||||
|
SagaInCurrent = { fg = C.peach },
|
||||||
|
|
||||||
|
-- Lspkind icons support
|
||||||
|
LspKindClass = { fg = C.yellow },
|
||||||
|
LspKindConstant = { fg = C.peach },
|
||||||
|
LspKindConstructor = { fg = C.sapphire },
|
||||||
|
LspKindEnum = { fg = C.yellow },
|
||||||
|
LspKindEnumMember = { fg = C.teal },
|
||||||
|
LspKindEvent = { fg = C.yellow },
|
||||||
|
LspKindField = { fg = C.teal },
|
||||||
|
LspKindFile = { fg = C.rosewater },
|
||||||
|
LspKindFunction = { fg = C.blue },
|
||||||
|
LspKindInterface = { fg = C.yellow },
|
||||||
|
LspKindKey = { fg = C.red },
|
||||||
|
LspKindMethod = { fg = C.blue },
|
||||||
|
LspKindModule = { fg = C.blue },
|
||||||
|
LspKindNamespace = { fg = C.blue },
|
||||||
|
LspKindNumber = { fg = C.peach },
|
||||||
|
LspKindOperator = { fg = C.sky },
|
||||||
|
LspKindPackage = { fg = C.blue },
|
||||||
|
LspKindProperty = { fg = C.teal },
|
||||||
|
LspKindStruct = { fg = C.yellow },
|
||||||
|
LspKindTypeParameter = { fg = C.blue },
|
||||||
|
LspKindVariable = { fg = C.peach },
|
||||||
|
LspKindArray = { fg = C.peach },
|
||||||
|
LspKindBoolean = { fg = C.peach },
|
||||||
|
LspKindNull = { fg = C.yellow },
|
||||||
|
LspKindObject = { fg = C.yellow },
|
||||||
|
LspKindString = { fg = C.green },
|
||||||
|
-- ccls-specific icons.
|
||||||
|
LspKindTypeAlias = { fg = C.green },
|
||||||
|
LspKindParameter = { fg = C.blue },
|
||||||
|
LspKindStaticMethod = { fg = C.peach },
|
||||||
|
-- Microsoft-specific icons.
|
||||||
|
LspKindText = { fg = C.green },
|
||||||
|
LspKindSnippet = { fg = C.mauve },
|
||||||
|
LspKindFolder = { fg = C.blue },
|
||||||
|
LspKindUnit = { fg = C.green },
|
||||||
|
LspKindValue = { fg = C.peach },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.custom_kind()
|
||||||
|
return {
|
||||||
|
File = { " ", "LspKindFile" },
|
||||||
|
Module = { " ", "LspKindModule" },
|
||||||
|
Namespace = { " ", "LspKindNamespace" },
|
||||||
|
Package = { " ", "LspKindPackage" },
|
||||||
|
Class = { " ", "LspKindClass" },
|
||||||
|
Method = { " ", "LspKindMethod" },
|
||||||
|
Property = { " ", "LspKindProperty" },
|
||||||
|
Field = { " ", "LspKindField" },
|
||||||
|
Constructor = { " ", "LspKindConstructor" },
|
||||||
|
Enum = { "", "LspKindEnum" },
|
||||||
|
Interface = { " ", "LspKindInterface" },
|
||||||
|
Function = { " ", "LspKindFunction" },
|
||||||
|
Variable = { " ", "LspKindVariable" },
|
||||||
|
Constant = { " ", "LspKindConstant" },
|
||||||
|
String = { " ", "LspKindString" },
|
||||||
|
Number = { " ", "LspKindNumber" },
|
||||||
|
Boolean = { " ", "LspKindBoolean" },
|
||||||
|
Array = { " ", "LspKindArray" },
|
||||||
|
Object = { " ", "LspKindObject" },
|
||||||
|
Key = { " ", "LspKindKey" },
|
||||||
|
Null = { " ", "LspKindNull" },
|
||||||
|
EnumMember = { " ", "LspKindEnumMember" },
|
||||||
|
Struct = { " ", "LspKindStruct" },
|
||||||
|
Event = { " ", "LspKindEvent" },
|
||||||
|
Operator = { " ", "LspKindOperator" },
|
||||||
|
TypeParameter = { " ", "LspKindTypeParameter" },
|
||||||
|
TypeAlias = { " ", "LspKindTypeAlias" },
|
||||||
|
Parameter = { " ", "LspKindParameter" },
|
||||||
|
StaticMethod = { " ", "LspKindStaticMethod" },
|
||||||
|
Macro = { " ", "LspKindMacro" },
|
||||||
|
Text = { " ", "LspKindText" },
|
||||||
|
Snippet = { " ", "LspKindSnippet" },
|
||||||
|
Folder = { " ", "LspKindFolder" },
|
||||||
|
Unit = { " ", "LspKindUnit" },
|
||||||
|
Value = { " ", "LspKindValue" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Backwards compatibility
|
||||||
|
function M.custom_colors()
|
||||||
|
local C = require("catppuccin.palettes").get_palette()
|
||||||
|
return {
|
||||||
|
normal_bg = C.base,
|
||||||
|
title_bg = C.green,
|
||||||
|
red = C.red,
|
||||||
|
magenta = C.maroon,
|
||||||
|
orange = C.peach,
|
||||||
|
yellow = C.yellow,
|
||||||
|
green = C.green,
|
||||||
|
cyan = C.sky,
|
||||||
|
blue = C.blue,
|
||||||
|
purple = C.mauve,
|
||||||
|
white = C.text,
|
||||||
|
black = C.crust,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
TroubleText = { fg = C.green },
|
||||||
|
TroubleCount = { fg = C.pink, bg = O.transparent_background and C.none or C.surface1 },
|
||||||
|
TroubleNormal = { fg = C.text, bg = O.transparent_background and C.none or C.crust },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
markdownHeadingDelimiter = { fg = C.peach, style = { "bold" } },
|
||||||
|
markdownCode = { fg = C.flamingo },
|
||||||
|
markdownCodeBlock = { fg = C.flamingo },
|
||||||
|
markdownLinkText = { fg = C.blue, style = { "underline" } },
|
||||||
|
markdownH1 = { link = "rainbow1" },
|
||||||
|
markdownH2 = { link = "rainbow2" },
|
||||||
|
markdownH3 = { link = "rainbow3" },
|
||||||
|
markdownH4 = { link = "rainbow4" },
|
||||||
|
markdownH5 = { link = "rainbow5" },
|
||||||
|
markdownH6 = { link = "rainbow6" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local bg = O.transparent_background and C.none or C.lavender
|
||||||
|
local fg = O.transparent_background and C.lavender or C.base
|
||||||
|
|
||||||
|
local secondary_bg = O.transparent_background and C.none or C.blue
|
||||||
|
local secondary_fg = O.transparent_background and C.blue or C.base
|
||||||
|
|
||||||
|
local muted_bg = O.transparent_background and C.none or C.overlay0
|
||||||
|
local muted_fg = O.transparent_background and C.overlay0 or C.base
|
||||||
|
|
||||||
|
return {
|
||||||
|
MasonHeader = { fg = fg, bg = bg, style = { "bold" } },
|
||||||
|
MasonHeaderSecondary = { fg = secondary_fg, bg = secondary_bg, style = { "bold" } },
|
||||||
|
|
||||||
|
MasonHighlight = { fg = C.green },
|
||||||
|
MasonHighlightBlock = {
|
||||||
|
bg = O.transparent_background and C.none or C.green,
|
||||||
|
fg = O.transparent_background and C.green or C.base,
|
||||||
|
},
|
||||||
|
MasonHighlightBlockBold = { bg = secondary_bg, fg = secondary_fg, bold = true },
|
||||||
|
|
||||||
|
MasonHighlightSecondary = { fg = C.mauve },
|
||||||
|
MasonHighlightBlockSecondary = { fg = secondary_fg, bg = secondary_bg },
|
||||||
|
MasonHighlightBlockBoldSecondary = { fg = fg, bg = bg, bold = true },
|
||||||
|
|
||||||
|
MasonMuted = { fg = C.overlay0 },
|
||||||
|
MasonMutedBlock = { bg = muted_bg, fg = muted_fg },
|
||||||
|
MasonMutedBlockBold = { bg = C.yellow, fg = C.base, bold = true },
|
||||||
|
|
||||||
|
MasonError = { fg = C.red },
|
||||||
|
|
||||||
|
MasonHeading = { fg = C.lavender, bold = true },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local transparent_background = require("catppuccin").options.transparent_background
|
||||||
|
local bg_highlight = transparent_background and "NONE" or C.base
|
||||||
|
|
||||||
|
local inactive_bg = transparent_background and "NONE" or C.mantle
|
||||||
|
|
||||||
|
local indentscope_color = O.integrations.mini.indentscope_color
|
||||||
|
return {
|
||||||
|
MiniCompletionActiveParameter = { style = { "underline" } },
|
||||||
|
|
||||||
|
MiniCursorword = { style = { "underline" } },
|
||||||
|
MiniCursorwordCurrent = { style = { "underline" } },
|
||||||
|
|
||||||
|
MiniIndentscopeSymbol = { fg = C[indentscope_color] or C.text },
|
||||||
|
MiniIndentscopePrefix = { style = { "nocombine" } }, -- Make it invisible
|
||||||
|
|
||||||
|
MiniJump = { fg = C.overlay2, bg = C.pink },
|
||||||
|
|
||||||
|
MiniJump2dSpot = { bg = C.base, fg = C.peach, style = { "bold", "underline" } },
|
||||||
|
|
||||||
|
MiniStarterCurrent = {},
|
||||||
|
MiniStarterFooter = { fg = C.yellow, style = { "italic" } },
|
||||||
|
MiniStarterHeader = { fg = C.blue },
|
||||||
|
MiniStarterInactive = { fg = C.surface2, style = O.styles.comments },
|
||||||
|
MiniStarterItem = { fg = C.text },
|
||||||
|
MiniStarterItemBullet = { fg = C.blue },
|
||||||
|
MiniStarterItemPrefix = { fg = C.pink },
|
||||||
|
MiniStarterSection = { fg = C.flamingo },
|
||||||
|
MiniStarterQuery = { fg = C.green },
|
||||||
|
|
||||||
|
MiniStatuslineDevinfo = { fg = C.subtext1, bg = C.surface1 },
|
||||||
|
MiniStatuslineFileinfo = { fg = C.subtext1, bg = C.surface1 },
|
||||||
|
MiniStatuslineFilename = { fg = C.text, bg = C.mantle },
|
||||||
|
MiniStatuslineInactive = { fg = C.blue, bg = C.mantle },
|
||||||
|
MiniStatuslineModeCommand = { fg = C.base, bg = C.peach, style = { "bold" } },
|
||||||
|
MiniStatuslineModeInsert = { fg = C.base, bg = C.green, style = { "bold" } },
|
||||||
|
MiniStatuslineModeNormal = { fg = C.mantle, bg = C.blue, style = { "bold" } },
|
||||||
|
MiniStatuslineModeOther = { fg = C.base, bg = C.teal, style = { "bold" } },
|
||||||
|
MiniStatuslineModeReplace = { fg = C.base, bg = C.red, style = { "bold" } },
|
||||||
|
MiniStatuslineModeVisual = { fg = C.base, bg = C.mauve, style = { "bold" } },
|
||||||
|
|
||||||
|
MiniSurround = { bg = C.pink, fg = C.surface1 },
|
||||||
|
|
||||||
|
MiniTablineCurrent = { fg = C.text, bg = C.base, sp = C.red, style = { "bold", "italic", "underline" } },
|
||||||
|
MiniTablineFill = { bg = bg_highlight },
|
||||||
|
MiniTablineHidden = { fg = C.text, bg = inactive_bg },
|
||||||
|
MiniTablineModifiedCurrent = { fg = C.red, bg = C.none, style = { "bold", "italic" } },
|
||||||
|
MiniTablineModifiedHidden = { fg = C.red, bg = C.none },
|
||||||
|
MiniTablineModifiedVisible = { fg = C.red, bg = C.none },
|
||||||
|
MiniTablineTabpagesection = { fg = C.surface1, bg = C.base },
|
||||||
|
MiniTablineVisible = { bg = C.none },
|
||||||
|
|
||||||
|
MiniTestEmphasis = { style = { "bold" } },
|
||||||
|
MiniTestFail = { fg = C.red, style = { "bold" } },
|
||||||
|
MiniTestPass = { fg = C.green, style = { "bold" } },
|
||||||
|
|
||||||
|
MiniTrailspace = { bg = C.red },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local virtual_text = O.integrations.native_lsp.virtual_text
|
||||||
|
local underlines = O.integrations.native_lsp.underlines
|
||||||
|
local inlay_hints = O.integrations.native_lsp.inlay_hints
|
||||||
|
|
||||||
|
local error = C.red
|
||||||
|
local warning = C.yellow
|
||||||
|
local info = C.sky
|
||||||
|
local hint = C.teal
|
||||||
|
local darkening_percentage = 0.095
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- These groups are for the native LSP client. Some other LSP clients may
|
||||||
|
-- use these groups, or use their own. Consult your LSP client's
|
||||||
|
-- documentation.
|
||||||
|
LspReferenceText = { bg = C.surface1 }, -- used for highlighting "text" references
|
||||||
|
LspReferenceRead = { bg = C.surface1 }, -- used for highlighting "read" references
|
||||||
|
LspReferenceWrite = { bg = C.surface1 }, -- used for highlighting "write" references
|
||||||
|
-- highlight diagnostics in numberline
|
||||||
|
|
||||||
|
DiagnosticVirtualTextError = {
|
||||||
|
bg = O.transparent_background and C.none or U.darken(error, darkening_percentage, C.base),
|
||||||
|
fg = error,
|
||||||
|
style = virtual_text.errors,
|
||||||
|
}, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticVirtualTextWarn = {
|
||||||
|
bg = O.transparent_background and C.none or U.darken(warning, darkening_percentage, C.base),
|
||||||
|
fg = warning,
|
||||||
|
style = virtual_text.warnings,
|
||||||
|
}, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticVirtualTextInfo = {
|
||||||
|
bg = O.transparent_background and C.none or U.darken(info, darkening_percentage, C.base),
|
||||||
|
fg = info,
|
||||||
|
style = virtual_text.information,
|
||||||
|
}, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticVirtualTextHint = {
|
||||||
|
bg = O.transparent_background and C.none or U.darken(hint, darkening_percentage, C.base),
|
||||||
|
fg = hint,
|
||||||
|
style = virtual_text.hints,
|
||||||
|
}, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
|
||||||
|
DiagnosticError = { bg = C.none, fg = error, style = virtual_text.errors }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticWarn = { bg = C.none, fg = warning, style = virtual_text.warnings }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticInfo = { bg = C.none, fg = info, style = virtual_text.information }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
DiagnosticHint = { bg = C.none, fg = hint, style = virtual_text.hints }, -- Used as the mantle highlight group. Other Diagnostic highlights link to this by default
|
||||||
|
|
||||||
|
-- for nvim nightly
|
||||||
|
DiagnosticUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics
|
||||||
|
DiagnosticUnderlineWarn = { style = underlines.warnings, sp = warning }, -- Used to underline "Warn" diagnostics
|
||||||
|
DiagnosticUnderlineInfo = { style = underlines.information, sp = info }, -- Used to underline "Info" diagnostics
|
||||||
|
DiagnosticUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics
|
||||||
|
|
||||||
|
DiagnosticFloatingError = { fg = error }, -- Used to color "Error" diagnostic messages in diagnostics float
|
||||||
|
DiagnosticFloatingWarn = { fg = warning }, -- Used to color "Warn" diagnostic messages in diagnostics float
|
||||||
|
DiagnosticFloatingInfo = { fg = info }, -- Used to color "Info" diagnostic messages in diagnostics float
|
||||||
|
DiagnosticFloatingHint = { fg = hint }, -- Used to color "Hint" diagnostic messages in diagnostics float
|
||||||
|
|
||||||
|
DiagnosticSignError = { fg = error }, -- Used for "Error" signs in sign column
|
||||||
|
DiagnosticSignWarn = { fg = warning }, -- Used for "Warn" signs in sign column
|
||||||
|
DiagnosticSignInfo = { fg = info }, -- Used for "Info" signs in sign column
|
||||||
|
DiagnosticSignHint = { fg = hint }, -- Used for "Hint" signs in sign column
|
||||||
|
|
||||||
|
LspDiagnosticsDefaultError = { fg = error }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||||
|
LspDiagnosticsDefaultWarning = { fg = warning }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||||
|
LspDiagnosticsDefaultInformation = { fg = info }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||||
|
LspDiagnosticsDefaultHint = { fg = hint }, -- Used as the mantle highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||||
|
LspSignatureActiveParameter = { fg = C.peach },
|
||||||
|
-- LspDiagnosticsFloatingError = { }, -- Used to color "Error" diagnostic messages in diagnostics float
|
||||||
|
-- LspDiagnosticsFloatingWarning = { }, -- Used to color "Warning" diagnostic messages in diagnostics float
|
||||||
|
-- LspDiagnosticsFloatingInformation = { }, -- Used to color "Information" diagnostic messages in diagnostics float
|
||||||
|
-- LspDiagnosticsFloatingHint = { }, -- Used to color "Hint" diagnostic messages in diagnostics float
|
||||||
|
|
||||||
|
LspDiagnosticsError = { fg = error },
|
||||||
|
LspDiagnosticsWarning = { fg = warning },
|
||||||
|
LspDiagnosticsInformation = { fg = info },
|
||||||
|
LspDiagnosticsHint = { fg = hint },
|
||||||
|
LspDiagnosticsVirtualTextError = { fg = error, style = virtual_text.errors }, -- Used for "Error" diagnostic virtual text
|
||||||
|
LspDiagnosticsVirtualTextWarning = { fg = warning, style = virtual_text.warnings }, -- Used for "Warning" diagnostic virtual text
|
||||||
|
LspDiagnosticsVirtualTextInformation = { fg = info, style = virtual_text.warnings }, -- Used for "Information" diagnostic virtual text
|
||||||
|
LspDiagnosticsVirtualTextHint = { fg = hint, style = virtual_text.hints }, -- Used for "Hint" diagnostic virtual text
|
||||||
|
LspDiagnosticsUnderlineError = { style = underlines.errors, sp = error }, -- Used to underline "Error" diagnostics
|
||||||
|
LspDiagnosticsUnderlineWarning = { style = underlines.warnings, sp = warning }, -- Used to underline "Warning" diagnostics
|
||||||
|
LspDiagnosticsUnderlineInformation = { style = underlines.information, sp = info }, -- Used to underline "Information" diagnostics
|
||||||
|
LspDiagnosticsUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics
|
||||||
|
LspCodeLens = { fg = C.overlay0 }, -- virtual text of the codelens
|
||||||
|
LspCodeLensSeparator = { link = "LspCodeLens" }, -- virtual text of the codelens separators
|
||||||
|
LspInlayHint = {
|
||||||
|
-- fg of `Comment`
|
||||||
|
fg = C.overlay0,
|
||||||
|
-- bg of `CursorLine`
|
||||||
|
bg = (O.transparent_background or not inlay_hints.background) and C.none
|
||||||
|
or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)),
|
||||||
|
}, -- virtual text of the inlay hints
|
||||||
|
LspInfoBorder = { link = "FloatBorder" }, -- LspInfo border
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local background = O.integrations.navic.custom_bg and O.integrations.navic.custom_bg or C.none
|
||||||
|
if O.integrations.navic.custom_bg == "lualine" then background = C.mantle end
|
||||||
|
|
||||||
|
return {
|
||||||
|
NavicIconsFile = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsModule = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsNamespace = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsPackage = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsClass = { fg = C.yellow, bg = background },
|
||||||
|
NavicIconsMethod = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsProperty = { fg = C.green, bg = background },
|
||||||
|
NavicIconsField = { fg = C.green, bg = background },
|
||||||
|
NavicIconsConstructor = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsEnum = { fg = C.green, bg = background },
|
||||||
|
NavicIconsInterface = { fg = C.yellow, bg = background },
|
||||||
|
NavicIconsFunction = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsVariable = { fg = C.flamingo, bg = background },
|
||||||
|
NavicIconsConstant = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsString = { fg = C.green, style = O.styles.strings, bg = background },
|
||||||
|
NavicIconsNumber = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsBoolean = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsArray = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsObject = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsKey = { fg = C.pink, style = O.styles.keywords, bg = background },
|
||||||
|
NavicIconsNull = { fg = C.peach, bg = background },
|
||||||
|
NavicIconsEnumMember = { fg = C.red, bg = background },
|
||||||
|
NavicIconsStruct = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsEvent = { fg = C.blue, bg = background },
|
||||||
|
NavicIconsOperator = { fg = C.sky, bg = background },
|
||||||
|
NavicIconsTypeParameter = { fg = C.blue, bg = background },
|
||||||
|
NavicText = { fg = C.sapphire, bg = background },
|
||||||
|
NavicSeparator = { fg = C.text, bg = background },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,244 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NeogitBranch = {
|
||||||
|
fg = C.peach,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitRemote = {
|
||||||
|
fg = C.green,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUnmergedInto = {
|
||||||
|
link = "Function",
|
||||||
|
},
|
||||||
|
NeogitUnpulledFrom = {
|
||||||
|
link = "Function",
|
||||||
|
},
|
||||||
|
NeogitObjectId = {
|
||||||
|
link = "Comment",
|
||||||
|
},
|
||||||
|
NeogitStash = {
|
||||||
|
link = "Comment",
|
||||||
|
},
|
||||||
|
NeogitRebaseDone = {
|
||||||
|
link = "Comment",
|
||||||
|
},
|
||||||
|
NeogitHunkHeader = {
|
||||||
|
bg = U.darken(C.blue, 0.095, C.base),
|
||||||
|
fg = U.darken(C.blue, 0.5, C.base),
|
||||||
|
},
|
||||||
|
NeogitHunkHeaderHighlight = {
|
||||||
|
bg = U.darken(C.blue, 0.215, C.base),
|
||||||
|
fg = C.blue,
|
||||||
|
},
|
||||||
|
NeogitDiffContextHighlight = {
|
||||||
|
bg = C.surface0,
|
||||||
|
},
|
||||||
|
NeogitDiffDeleteHighlight = {
|
||||||
|
bg = U.darken(C.red, 0.345, C.base),
|
||||||
|
fg = U.lighten(C.red, 0.850, C.text),
|
||||||
|
},
|
||||||
|
NeogitDiffAddHighlight = {
|
||||||
|
bg = U.darken(C.green, 0.345, C.base),
|
||||||
|
fg = U.lighten(C.green, 0.850, C.text),
|
||||||
|
},
|
||||||
|
NeogitDiffDelete = {
|
||||||
|
bg = U.darken(C.red, 0.095, C.base),
|
||||||
|
fg = U.darken(C.red, 0.800, C.base),
|
||||||
|
},
|
||||||
|
NeogitDiffAdd = {
|
||||||
|
bg = U.darken(C.green, 0.095, C.base),
|
||||||
|
fg = U.darken(C.green, 0.800, C.base),
|
||||||
|
},
|
||||||
|
NeogitCommitViewHeader = {
|
||||||
|
bg = U.darken(C.blue, 0.300, C.base),
|
||||||
|
fg = U.lighten(C.blue, 0.800, C.text),
|
||||||
|
},
|
||||||
|
NeogitChangeModified = {
|
||||||
|
fg = C.blue,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeDeleted = {
|
||||||
|
fg = C.red,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeAdded = {
|
||||||
|
fg = C.green,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeRenamed = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeUpdated = {
|
||||||
|
fg = C.peach,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeCopied = {
|
||||||
|
fg = C.pink,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeBothModified = {
|
||||||
|
fg = C.yellow,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitChangeNewFile = {
|
||||||
|
fg = C.green,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUntrackedfiles = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUnstagedchanges = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUnmergedchanges = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUnpulledchanges = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitRecentcommits = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitStagedchanges = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitStashes = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitRebasing = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitNotificationInfo = {
|
||||||
|
fg = C.blue,
|
||||||
|
},
|
||||||
|
NeogitNotificationWarning = {
|
||||||
|
fg = C.yellow,
|
||||||
|
},
|
||||||
|
NeogitNotificationError = {
|
||||||
|
fg = C.red,
|
||||||
|
},
|
||||||
|
NeogitGraphRed = {
|
||||||
|
fg = C.red,
|
||||||
|
},
|
||||||
|
NeogitGraphWhite = {
|
||||||
|
fg = C.base,
|
||||||
|
},
|
||||||
|
NeogitGraphYellow = {
|
||||||
|
fg = C.yellow,
|
||||||
|
},
|
||||||
|
NeogitGraphGreen = {
|
||||||
|
fg = C.green,
|
||||||
|
},
|
||||||
|
NeogitGraphCyan = {
|
||||||
|
fg = C.blue,
|
||||||
|
},
|
||||||
|
NeogitGraphBlue = {
|
||||||
|
fg = C.blue,
|
||||||
|
},
|
||||||
|
NeogitGraphPurple = {
|
||||||
|
fg = C.lavender,
|
||||||
|
},
|
||||||
|
NeogitGraphGray = {
|
||||||
|
fg = C.subtext1,
|
||||||
|
},
|
||||||
|
NeogitGraphOrange = {
|
||||||
|
fg = C.peach,
|
||||||
|
},
|
||||||
|
NeogitGraphBoldRed = {
|
||||||
|
fg = C.red,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldWhite = {
|
||||||
|
fg = C.white,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldYellow = {
|
||||||
|
fg = C.yellow,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldGreen = {
|
||||||
|
fg = C.green,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldCyan = {
|
||||||
|
fg = C.blue,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldBlue = {
|
||||||
|
fg = C.blue,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldPurple = {
|
||||||
|
fg = C.lavender,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitGraphBoldGray = {
|
||||||
|
fg = C.subtext1,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitDiffContext = {
|
||||||
|
bg = C.base,
|
||||||
|
},
|
||||||
|
NeogitPopupBold = {
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitPopupSwitchKey = {
|
||||||
|
fg = C.lavender,
|
||||||
|
},
|
||||||
|
NeogitPopupOptionKey = {
|
||||||
|
fg = C.lavender,
|
||||||
|
},
|
||||||
|
NeogitPopupConfigKey = {
|
||||||
|
fg = C.lavender,
|
||||||
|
},
|
||||||
|
NeogitPopupActionKey = {
|
||||||
|
fg = C.lavender,
|
||||||
|
},
|
||||||
|
NeogitFilePath = {
|
||||||
|
fg = C.blue,
|
||||||
|
style = { "italic" },
|
||||||
|
},
|
||||||
|
NeogitDiffHeader = {
|
||||||
|
bg = C.base,
|
||||||
|
fg = C.blue,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitDiffHeaderHighlight = {
|
||||||
|
bg = C.base,
|
||||||
|
fg = C.peach,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitUnpushedTo = {
|
||||||
|
fg = C.lavender,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitFold = {
|
||||||
|
fg = C.none,
|
||||||
|
bg = C.none,
|
||||||
|
},
|
||||||
|
NeogitSectionHeader = {
|
||||||
|
fg = C.mauve,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
NeogitTagName = {
|
||||||
|
fg = C.yellow,
|
||||||
|
},
|
||||||
|
NeogitTagDistance = {
|
||||||
|
fg = C.blue,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NeotestPassed = { fg = C.green },
|
||||||
|
NeotestFailed = { fg = C.red },
|
||||||
|
NeotestRunning = { fg = C.yellow },
|
||||||
|
NeotestSkipped = { fg = C.blue },
|
||||||
|
NeotestTest = { fg = C.text },
|
||||||
|
NeotestNamespace = { fg = C.mauve },
|
||||||
|
NeotestFocused = { style = { "bold", "underline" } },
|
||||||
|
NeotestFile = { fg = C.blue },
|
||||||
|
NeotestDir = { fg = C.blue },
|
||||||
|
NeotestIndent = { fg = C.overlay1 },
|
||||||
|
NeotestExpandMarker = { fg = C.overlay1 },
|
||||||
|
NeotestAdapterName = { fg = C.maroon },
|
||||||
|
NeotestWinSelect = { fg = C.blue, style = { "bold" } },
|
||||||
|
NeotestMarked = { fg = C.peach, style = { "bold" } },
|
||||||
|
NeotestTarget = { fg = C.red },
|
||||||
|
NeotestUnknown = { fg = C.text },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
local active_bg = O.transparent_background and C.none or C.mantle
|
||||||
|
local inactive_bg = O.transparent_background and C.none or C.base
|
||||||
|
return {
|
||||||
|
NeoTreeDirectoryName = { fg = C.blue },
|
||||||
|
NeoTreeDirectoryIcon = { fg = C.blue },
|
||||||
|
NeoTreeNormal = { fg = C.text, bg = active_bg },
|
||||||
|
NeoTreeNormalNC = { fg = C.text, bg = active_bg },
|
||||||
|
NeoTreeExpander = { fg = C.overlay0 },
|
||||||
|
NeoTreeIndentMarker = { fg = C.overlay0 },
|
||||||
|
NeoTreeRootName = { fg = C.blue, style = { "bold" } },
|
||||||
|
NeoTreeSymbolicLinkTarget = { fg = C.pink },
|
||||||
|
NeoTreeModified = { fg = C.peach },
|
||||||
|
|
||||||
|
NeoTreeGitAdded = { fg = C.green },
|
||||||
|
NeoTreeGitConflict = { fg = C.red },
|
||||||
|
NeoTreeGitDeleted = { fg = C.red },
|
||||||
|
NeoTreeGitIgnored = { fg = C.overlay0 },
|
||||||
|
NeoTreeGitModified = { fg = C.yellow },
|
||||||
|
NeoTreeGitUnstaged = { fg = C.red },
|
||||||
|
NeoTreeGitUntracked = { fg = C.mauve },
|
||||||
|
NeoTreeGitStaged = { fg = C.green },
|
||||||
|
|
||||||
|
NeoTreeFloatBorder = { link = "FloatBorder" },
|
||||||
|
NeoTreeFloatTitle = { link = "FloatTitle" },
|
||||||
|
NeoTreeTitleBar = { fg = C.mantle, bg = C.blue },
|
||||||
|
|
||||||
|
NeoTreeFileNameOpened = { fg = C.pink },
|
||||||
|
NeoTreeDimText = { fg = C.overlay1 },
|
||||||
|
NeoTreeFilterTerm = { fg = C.green, style = { "bold" } },
|
||||||
|
NeoTreeTabActive = { bg = active_bg, fg = C.lavender, style = { "bold" } },
|
||||||
|
NeoTreeTabInactive = { bg = inactive_bg, fg = C.overlay0 },
|
||||||
|
NeoTreeTabSeparatorActive = { fg = active_bg, bg = active_bg },
|
||||||
|
NeoTreeTabSeparatorInactive = { fg = inactive_bg, bg = inactive_bg },
|
||||||
|
NeoTreeVertSplit = { fg = C.base, bg = inactive_bg },
|
||||||
|
NeoTreeWinSeparator = {
|
||||||
|
fg = O.transparent_background and C.surface1 or C.base,
|
||||||
|
bg = O.transparent_background and C.none or C.base,
|
||||||
|
},
|
||||||
|
NeoTreeStatusLineNC = { fg = C.mantle, bg = C.mantle },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local virtual_text = O.integrations.native_lsp.virtual_text
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return { -- Personally the default integration is already pretty good
|
||||||
|
NoiceCmdline = { fg = C.text },
|
||||||
|
NoiceCmdlineIcon = { fg = C.sky, style = virtual_text.information },
|
||||||
|
NoiceCmdlineIconSearch = { fg = C.yellow },
|
||||||
|
NoiceCmdlinePopupBorder = { fg = C.lavender },
|
||||||
|
NoiceCmdlinePopupBorderSearch = { fg = C.yellow },
|
||||||
|
NoiceConfirmBorder = { fg = C.blue },
|
||||||
|
NoiceMini = { fg = C.subtext0, blend = 0 },
|
||||||
|
NoiceFormatProgressDone = {
|
||||||
|
bg = O.transparent_background and C.none or U.darken(C.sky, 0.30, C.base),
|
||||||
|
fg = C.subtext0,
|
||||||
|
},
|
||||||
|
NoiceFormatProgressTodo = {
|
||||||
|
bg = O.transparent_background and C.none
|
||||||
|
or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)),
|
||||||
|
fg = C.subtext0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NotifierIcon = { fg = C.mauve },
|
||||||
|
NotifierContent = { fg = C.overlay2, blend = 0, style = { "italic" } },
|
||||||
|
NotifierContentDim = { fg = C.overlay1, blend = 0, style = { "italic" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NotifyBackground = { bg = (O.transparent_background and vim.o.winblend == 0) and "#000000" or C.mantle },
|
||||||
|
|
||||||
|
NotifyERRORBorder = { fg = C.red },
|
||||||
|
NotifyERRORIcon = { fg = C.red },
|
||||||
|
NotifyERRORTitle = { fg = C.red, style = { "italic" } },
|
||||||
|
NotifyWARNBorder = { fg = C.yellow },
|
||||||
|
NotifyWARNIcon = { fg = C.yellow },
|
||||||
|
NotifyWARNTitle = { fg = C.yellow, style = { "italic" } },
|
||||||
|
NotifyINFOBorder = { fg = C.blue },
|
||||||
|
NotifyINFOIcon = { fg = C.blue },
|
||||||
|
NotifyINFOTitle = { fg = C.blue, style = { "italic" } },
|
||||||
|
NotifyDEBUGBorder = { fg = C.peach },
|
||||||
|
NotifyDEBUGIcon = { fg = C.peach },
|
||||||
|
NotifyDEBUGTitle = { fg = C.peach, style = { "italic" } },
|
||||||
|
NotifyTRACEBorder = { fg = C.rosewater },
|
||||||
|
NotifyTRACEIcon = { fg = C.rosewater },
|
||||||
|
NotifyTRACETitle = { fg = C.rosewater, style = { "italic" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
NvimTreeFolderName = { fg = C.blue },
|
||||||
|
NvimTreeFolderIcon = { fg = C.blue },
|
||||||
|
NvimTreeNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle },
|
||||||
|
NvimTreeOpenedFolderName = { fg = C.blue },
|
||||||
|
NvimTreeEmptyFolderName = { fg = C.blue },
|
||||||
|
NvimTreeIndentMarker = { fg = C.overlay0 },
|
||||||
|
NvimTreeWinSeparator = {
|
||||||
|
fg = O.transparent_background and C.surface1 or C.base,
|
||||||
|
bg = O.transparent_background and C.none or C.base,
|
||||||
|
},
|
||||||
|
NvimTreeRootFolder = { fg = C.lavender, style = { "bold" } },
|
||||||
|
NvimTreeSymlink = { fg = C.pink },
|
||||||
|
NvimTreeStatuslineNc = { fg = C.mantle, bg = C.mantle },
|
||||||
|
NvimTreeGitDirty = { fg = C.yellow },
|
||||||
|
NvimTreeGitNew = { fg = C.blue },
|
||||||
|
NvimTreeGitDeleted = { fg = C.red },
|
||||||
|
NvimTreeSpecialFile = { fg = C.flamingo },
|
||||||
|
NvimTreeImageFile = { fg = C.text },
|
||||||
|
NvimTreeOpenedFile = { fg = C.pink },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
-- colors
|
||||||
|
OctoGrey = { fg = C.base },
|
||||||
|
OctoBlue = { fg = C.blue },
|
||||||
|
OctoGreen = { fg = C.green },
|
||||||
|
OctoRed = { fg = C.red },
|
||||||
|
OctoPurple = { fg = C.mauve },
|
||||||
|
OctoYellow = { fg = C.yellow },
|
||||||
|
-- highlight groups
|
||||||
|
OctoDirty = { link = "ErrorMsg" },
|
||||||
|
OctoIssueTitle = { link = "PreProc" },
|
||||||
|
OctoIssueId = { link = "Question" },
|
||||||
|
OctoEmpty = { link = "Comment" },
|
||||||
|
OctoFloat = { link = "NormalNC" },
|
||||||
|
OctoDate = { link = "Comment" },
|
||||||
|
OctoSymbol = { link = "Comment" },
|
||||||
|
OctoTimelineItemHeading = { link = "Comment" },
|
||||||
|
OctoDetailsLabel = { link = "Title" },
|
||||||
|
OctoMissingDetails = { link = "Comment" },
|
||||||
|
OctoDetailsValue = { link = "Identifier" },
|
||||||
|
OctoDiffHunkPosition = { link = "NormalFloat" },
|
||||||
|
OctoCommentLine = { link = "TabLineSel" },
|
||||||
|
OctoViewer = { fg = C.base, bg = C.blue },
|
||||||
|
OctoBubble = { fg = C.text, bg = C.mantle },
|
||||||
|
OctoBubbleGrey = { fg = C.text, bg = C.mantle },
|
||||||
|
OctoBubbleDelimiterGrey = { fg = C.mantle },
|
||||||
|
OctoBubbleGreen = { fg = C.base, bg = C.green },
|
||||||
|
OctoBubbleDelimiterGreen = { fg = C.green },
|
||||||
|
OctoBubbleBlue = { fg = C.base, bg = C.sky },
|
||||||
|
OctoBubbleDelimiterBlue = { fg = C.sky },
|
||||||
|
OctoBubbleYellow = { fg = C.base, bg = C.yellow },
|
||||||
|
OctoBubbleDelimiterYellow = { fg = C.yellow },
|
||||||
|
OctoBubbleRed = { fg = C.base, bg = C.red },
|
||||||
|
OctoBubbleDelimiterRed = { fg = C.red },
|
||||||
|
OctoBubblePurple = { fg = C.base, bg = C.mauve },
|
||||||
|
OctoBubbleDelimiterPurple = { fg = C.mauve },
|
||||||
|
OctoUser = { link = "OctoBubble" },
|
||||||
|
OctoUserViewer = { link = "OctoViewer" },
|
||||||
|
OctoReaction = { link = "OctoBubble" },
|
||||||
|
OctoReactionViewer = { link = "OctoViewer" },
|
||||||
|
OctoPassingTest = { link = "OctoGreen" },
|
||||||
|
OctoFailingTest = { link = "OctoRed" },
|
||||||
|
OctoPullAdditions = { link = "OctoGreen" },
|
||||||
|
OctoPullDeletions = { link = "OctoRed" },
|
||||||
|
OctoPullModifications = { fg = C.peach },
|
||||||
|
OctoStateOpen = { fg = C.green, bg = C.mantle },
|
||||||
|
OctoStateOpenFloat = { fg = C.green, bg = C.mantle },
|
||||||
|
OctoStateClosed = { fg = C.red, bg = C.mantle },
|
||||||
|
OctoStateClosedFloat = { fg = C.red, bg = C.mantle },
|
||||||
|
OctoStateMerged = { fg = C.mauve, bg = C.mantle },
|
||||||
|
OctoStateMergedFloat = { fg = C.mauve, bg = C.mantle },
|
||||||
|
OctoStatePending = { fg = C.peach, bg = C.mantle },
|
||||||
|
OctoStatePendingFloat = { fg = C.peach, bg = C.mantle },
|
||||||
|
OctoStateApproved = { link = "OctoStateOpen" },
|
||||||
|
OctoStateApprovedFloat = { link = "OctoStateOpen" },
|
||||||
|
OctoStateChangesRequested = { fg = C.maroon, bg = C.mantle },
|
||||||
|
OctoStateChangesRequestedFloat = { fg = C.maroon, bg = C.mantle },
|
||||||
|
OctoStateCommented = { link = "Normal" },
|
||||||
|
OctoStateCommentedFloat = { link = "Normal" },
|
||||||
|
OctoStateDismissed = { link = "OctoStateClosed" },
|
||||||
|
OctoStateDismissedFloat = { link = "OctoStateClosed" },
|
||||||
|
OctoStateSubmittedBubble = { link = "OctoBubbleGreen" },
|
||||||
|
OctoFilePanelCounter = { fg = C.blue, style = { "bold" } },
|
||||||
|
OctoFilePanelTitle = { fg = C.blue, style = { "bold" } },
|
||||||
|
OctoNormalFront = { fg = C.text },
|
||||||
|
OctoYellowFloat = { fg = C.yellow, bg = C.mantle },
|
||||||
|
OctoPurpleFloat = { fg = C.mauve, bg = C.mantle },
|
||||||
|
OctoRedFloat = { fg = C.red, bg = C.mantle },
|
||||||
|
OctoGreenFloat = { fg = C.green, bg = C.mantle },
|
||||||
|
OctoGreyFloat = { fg = C.text, bg = C.mantle },
|
||||||
|
OctoBlueFloat = { fg = C.blue, bg = C.mantle },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
OverseerPENDING = { fg = C.grey },
|
||||||
|
OverseerRUNNING = { fg = C.yellow },
|
||||||
|
OverseerSUCCESS = { fg = C.green },
|
||||||
|
OverseerCANCELED = { fg = C.overlay2 },
|
||||||
|
OverseerFAILURE = { fg = C.red },
|
||||||
|
OverseerTask = { fg = C.blue },
|
||||||
|
OverseerTaskBorder = { fg = C.sky },
|
||||||
|
OverseerOutput = { fg = C.text },
|
||||||
|
OverseerComponent = { fg = C.yellow },
|
||||||
|
OverseerField = { fg = C.green },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
PounceMatch = { bg = U.lighten(C.green, 0.7), fg = C.base, style = { "bold" } },
|
||||||
|
PounceGap = { bg = U.darken(C.green, 0.7), fg = C.base, style = { "bold" } },
|
||||||
|
PounceAccept = { bg = C.peach, fg = C.base, style = { "bold" } },
|
||||||
|
PounceAcceptBest = { bg = C.teal, fg = C.base, style = { "bold" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
RainbowDelimiterRed = { fg = C.red },
|
||||||
|
RainbowDelimiterYellow = { fg = C.yellow },
|
||||||
|
RainbowDelimiterBlue = { fg = C.blue },
|
||||||
|
RainbowDelimiterOrange = { fg = C.peach },
|
||||||
|
RainbowDelimiterGreen = { fg = C.green },
|
||||||
|
RainbowDelimiterViolet = { fg = C.mauve },
|
||||||
|
RainbowDelimiterCyan = { fg = C.teal },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
OperatorSandwichAdd = { bg = C.blue, fg = C.base },
|
||||||
|
OperatorSandwichBuns = { bg = C.blue, fg = C.base },
|
||||||
|
OperatorSandwichChange = { bg = C.blue, fg = C.base },
|
||||||
|
OperatorSandwichDelete = { bg = C.blue, fg = C.base },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
if vim.treesitter.highlighter.hl_map then
|
||||||
|
vim.notify_once(
|
||||||
|
[[Catppuccin (info):
|
||||||
|
semantic_tokens integration requires neovim 0.8
|
||||||
|
If you want to stay on nvim 0.7, disable the integration.
|
||||||
|
]],
|
||||||
|
vim.log.levels.INFO
|
||||||
|
)
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
return {
|
||||||
|
["@lsp.type.boolean"] = { link = "@boolean" },
|
||||||
|
["@lsp.type.builtinType"] = { link = "@type.builtin" },
|
||||||
|
["@lsp.type.comment"] = { link = "@comment" },
|
||||||
|
["@lsp.type.enum"] = { link = "@type" },
|
||||||
|
["@lsp.type.enumMember"] = { link = "@constant" },
|
||||||
|
["@lsp.type.escapeSequence"] = { link = "@string.escape" },
|
||||||
|
["@lsp.type.formatSpecifier"] = { link = "@punctuation.special" },
|
||||||
|
["@lsp.type.interface"] = { fg = C.flamingo },
|
||||||
|
["@lsp.type.keyword"] = { link = "@keyword" },
|
||||||
|
["@lsp.type.namespace"] = { link = "@module" },
|
||||||
|
["@lsp.type.number"] = { link = "@number" },
|
||||||
|
["@lsp.type.operator"] = { link = "@operator" },
|
||||||
|
["@lsp.type.parameter"] = { link = "@parameter" },
|
||||||
|
["@lsp.type.property"] = { link = "@property" },
|
||||||
|
["@lsp.type.selfKeyword"] = { link = "@variable.builtin" },
|
||||||
|
["@lsp.type.typeAlias"] = { link = "@type.definition" },
|
||||||
|
["@lsp.type.unresolvedReference"] = { link = "@error" },
|
||||||
|
["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
|
||||||
|
["@lsp.typemod.class.defaultLibrary"] = { link = "@type.builtin" },
|
||||||
|
["@lsp.typemod.enum.defaultLibrary"] = { link = "@type.builtin" },
|
||||||
|
["@lsp.typemod.enumMember.defaultLibrary"] = { link = "@constant.builtin" },
|
||||||
|
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
|
||||||
|
["@lsp.typemod.keyword.async"] = { link = "@keyword.coroutine" },
|
||||||
|
["@lsp.typemod.macro.defaultLibrary"] = { link = "@function.builtin" },
|
||||||
|
["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" },
|
||||||
|
["@lsp.typemod.operator.injected"] = { link = "@operator" },
|
||||||
|
["@lsp.typemod.string.injected"] = { link = "@string" },
|
||||||
|
["@lsp.typemod.type.defaultLibrary"] = { link = "@type.builtin" },
|
||||||
|
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
|
||||||
|
["@lsp.typemod.variable.injected"] = { link = "@variable" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
-- https://github.com/simrat39/symbols-outline.nvim
|
||||||
|
FocusedSymbol = { fg = C.yellow, bg = C.none },
|
||||||
|
|
||||||
|
-- https://github.com/hedyhli/outline.nvim
|
||||||
|
OutlineCurrent = { link = "FocusedSymbol" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
tkLink = { fg = C.blue },
|
||||||
|
tkBrackets = { fg = C.pink },
|
||||||
|
tkTag = { fg = C.sky },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
if O.integrations.telescope.style == "nvchad" then
|
||||||
|
return {
|
||||||
|
TelescopeBorder = {
|
||||||
|
fg = O.transparent_background and C.blue or C.mantle,
|
||||||
|
bg = O.transparent_background and C.none or C.mantle,
|
||||||
|
},
|
||||||
|
TelescopeMatching = { fg = C.blue },
|
||||||
|
TelescopeNormal = {
|
||||||
|
bg = O.transparent_background and C.none or C.mantle,
|
||||||
|
},
|
||||||
|
TelescopePromptBorder = {
|
||||||
|
fg = O.transparent_background and C.blue or C.surface0,
|
||||||
|
bg = O.transparent_background and C.none or C.surface0,
|
||||||
|
},
|
||||||
|
TelescopePromptNormal = {
|
||||||
|
fg = C.text,
|
||||||
|
bg = O.transparent_background and C.none or C.surface0,
|
||||||
|
},
|
||||||
|
TelescopePromptPrefix = {
|
||||||
|
fg = C.flamingo,
|
||||||
|
bg = O.transparent_background and C.none or C.surface0,
|
||||||
|
},
|
||||||
|
TelescopePreviewTitle = {
|
||||||
|
fg = O.transparent_background and C.green or C.base,
|
||||||
|
bg = O.transparent_background and C.none or C.green,
|
||||||
|
},
|
||||||
|
TelescopePromptTitle = {
|
||||||
|
fg = O.transparent_background and C.red or C.base,
|
||||||
|
bg = O.transparent_background and C.none or C.red,
|
||||||
|
},
|
||||||
|
TelescopeResultsTitle = {
|
||||||
|
fg = O.transparent_background and C.lavender or C.mantle,
|
||||||
|
bg = O.transparent_background and C.none or C.lavender,
|
||||||
|
},
|
||||||
|
TelescopeSelection = {
|
||||||
|
fg = O.transparent_background and C.flamingo or C.text,
|
||||||
|
bg = O.transparent_background and C.none or C.surface0,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
TelescopeSelectionCaret = { fg = C.flamingo },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- TelescopeNormal = { link = "NormalFloat" }, -- Respect telescope's default float bg
|
||||||
|
TelescopeBorder = { link = "FloatBorder" },
|
||||||
|
TelescopeSelectionCaret = { fg = C.flamingo },
|
||||||
|
TelescopeSelection = {
|
||||||
|
fg = O.transparent_background and C.flamingo or C.text,
|
||||||
|
bg = O.transparent_background and C.none or C.surface0,
|
||||||
|
style = { "bold" },
|
||||||
|
},
|
||||||
|
TelescopeMatching = { fg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,274 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
if vim.treesitter.highlighter.hl_map then
|
||||||
|
vim.notify_once(
|
||||||
|
[[Catppuccin (info):
|
||||||
|
nvim-treesitter integration requires neovim 0.8
|
||||||
|
If you want to stay on nvim 0.7, either disable the integration or pin catppuccin tag to v0.2.4 and nvim-treesitter commit to 4cccb6f494eb255b32a290d37c35ca12584c74d0.
|
||||||
|
]],
|
||||||
|
vim.log.levels.INFO
|
||||||
|
)
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local colors = { -- Reference: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
||||||
|
-- Identifiers
|
||||||
|
["@variable"] = { fg = C.text, style = O.styles.variables or {} }, -- Any variable name that does not have another highlight.
|
||||||
|
["@variable.builtin"] = { fg = C.red, style = O.styles.properties or {} }, -- Variable names that are defined by the languages, like this or self.
|
||||||
|
["@variable.parameter"] = { fg = C.maroon, style = O.styles.variables or {} }, -- For parameters of a function.
|
||||||
|
["@variable.member"] = { fg = C.lavender }, -- For fields.
|
||||||
|
|
||||||
|
["@constant"] = { link = "Constant" }, -- For constants
|
||||||
|
["@constant.builtin"] = { fg = C.peach, style = O.styles.keywords or {} }, -- For constant that are built in the language: nil in Lua.
|
||||||
|
["@constant.macro"] = { link = "Macro" }, -- For constants that are defined by macros: NULL in C.
|
||||||
|
|
||||||
|
["@module"] = { fg = C.lavender, style = O.styles.miscs or { "italic" } }, -- For identifiers referring to modules and namespaces.
|
||||||
|
["@label"] = { link = "Label" }, -- For labels: label: in C and :label: in Lua.
|
||||||
|
|
||||||
|
-- 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.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
|
||||||
|
["@character.special"] = { link = "SpecialChar" }, -- special characters (e.g. wildcards)
|
||||||
|
|
||||||
|
["@boolean"] = { link = "Boolean" }, -- For booleans.
|
||||||
|
["@number"] = { link = "Number" }, -- For all numbers
|
||||||
|
["@number.float"] = { link = "Float" }, -- For floats.
|
||||||
|
|
||||||
|
-- Types
|
||||||
|
["@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)
|
||||||
|
|
||||||
|
["@attribute"] = { link = "Constant" }, -- attribute annotations (e.g. Python decorators)
|
||||||
|
["@property"] = { fg = C.lavender, style = O.styles.properties or {} }, -- Same as TSField.
|
||||||
|
|
||||||
|
-- Functions
|
||||||
|
["@function"] = { link = "Function" }, -- For function (calls and definitions).
|
||||||
|
["@function.builtin"] = { fg = C.peach, style = O.styles.functions or {} }, -- For builtin functions: table.insert in Lua.
|
||||||
|
["@function.call"] = { link = "Function" }, -- function calls
|
||||||
|
["@function.macro"] = { fg = C.teal, style = O.styles.functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in Rust.
|
||||||
|
|
||||||
|
["@function.method"] = { link = "Function" }, -- For method definitions.
|
||||||
|
["@function.method.call"] = { link = "Function" }, -- For method calls.
|
||||||
|
|
||||||
|
["@constructor"] = { fg = C.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
|
||||||
|
["@operator"] = { link = "Operator" }, -- For any operator: +, but also -> and * in C.
|
||||||
|
|
||||||
|
-- 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"] = { 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.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
|
||||||
|
-- JS & derivative
|
||||||
|
["@keyword.export"] = { fg = C.sky, style = O.styles.keywords },
|
||||||
|
|
||||||
|
-- Punctuation
|
||||||
|
["@punctuation.delimiter"] = { link = "Delimiter" }, -- For delimiters (e.g. `;` / `.` / `,`).
|
||||||
|
["@punctuation.bracket"] = { fg = C.overlay2 }, -- For brackets and parenthesis.
|
||||||
|
["@punctuation.special"] = { link = "Special" }, -- For special punctuation that does not fall in the categories before (e.g. `{}` in string interpolation).
|
||||||
|
|
||||||
|
-- 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.
|
||||||
|
["@markup.strong"] = { fg = C.maroon, style = { "bold" } }, -- bold
|
||||||
|
["@markup.italic"] = { fg = C.maroon, style = { "italic" } }, -- italic
|
||||||
|
["@markup.strikethrough"] = { fg = C.text, style = { "strikethrough" } }, -- strikethrough text
|
||||||
|
["@markup.underline"] = { link = "Underlined" }, -- underlined text
|
||||||
|
|
||||||
|
["@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 (""")
|
||||||
|
|
||||||
|
["@markup.list"] = { link = "Special" },
|
||||||
|
["@markup.list.checked"] = { fg = C.green }, -- todo notes
|
||||||
|
["@markup.list.unchecked"] = { fg = C.overlay1 }, -- todo notes
|
||||||
|
|
||||||
|
-- Diff
|
||||||
|
["@diff.plus"] = { link = "diffAdded" }, -- added text (for diff files)
|
||||||
|
["@diff.minus"] = { link = "diffRemoved" }, -- deleted text (for diff files)
|
||||||
|
["@diff.delta"] = { link = "diffChanged" }, -- deleted text (for diff files)
|
||||||
|
|
||||||
|
-- Tags
|
||||||
|
["@tag"] = { fg = C.mauve }, -- Tags like html tag names.
|
||||||
|
["@tag.attribute"] = { fg = C.teal, style = O.styles.miscs or { "italic" } }, -- Tags like html tag names.
|
||||||
|
["@tag.delimiter"] = { fg = C.sky }, -- Tag delimiter like < > /
|
||||||
|
|
||||||
|
-- Misc
|
||||||
|
["@error"] = { link = "Error" },
|
||||||
|
|
||||||
|
-- Language specific:
|
||||||
|
-- bash
|
||||||
|
["@function.builtin.bash"] = { fg = C.red, style = O.styles.miscs or { "italic" } },
|
||||||
|
|
||||||
|
-- markdown
|
||||||
|
["@markup.heading.1.markdown"] = { link = "rainbow1" },
|
||||||
|
["@markup.heading.2.markdown"] = { link = "rainbow2" },
|
||||||
|
["@markup.heading.3.markdown"] = { link = "rainbow3" },
|
||||||
|
["@markup.heading.4.markdown"] = { link = "rainbow4" },
|
||||||
|
["@markup.heading.5.markdown"] = { link = "rainbow5" },
|
||||||
|
["@markup.heading.6.markdown"] = { link = "rainbow6" },
|
||||||
|
|
||||||
|
-- java
|
||||||
|
["@constant.java"] = { fg = C.teal },
|
||||||
|
|
||||||
|
-- css
|
||||||
|
["@property.css"] = { fg = C.lavender },
|
||||||
|
["@property.id.css"] = { fg = C.blue },
|
||||||
|
["@property.class.css"] = { fg = C.yellow },
|
||||||
|
["@type.css"] = { fg = C.lavender },
|
||||||
|
["@type.tag.css"] = { fg = C.mauve },
|
||||||
|
["@string.plain.css"] = { fg = C.peach },
|
||||||
|
["@number.css"] = { fg = C.peach },
|
||||||
|
|
||||||
|
-- toml
|
||||||
|
["@property.toml"] = { fg = C.blue }, -- Differentiates between string and properties
|
||||||
|
|
||||||
|
-- json
|
||||||
|
["@label.json"] = { fg = C.blue }, -- For labels: label: in C and :label: in Lua.
|
||||||
|
|
||||||
|
-- lua
|
||||||
|
["@constructor.lua"] = { fg = C.flamingo }, -- For constructor calls and definitions: = { } in Lua.
|
||||||
|
|
||||||
|
-- typescript
|
||||||
|
["@property.typescript"] = { fg = C.lavender, style = O.styles.properties or {} },
|
||||||
|
["@constructor.typescript"] = { fg = C.lavender },
|
||||||
|
|
||||||
|
-- TSX (Typescript React)
|
||||||
|
["@constructor.tsx"] = { fg = C.lavender },
|
||||||
|
["@tag.attribute.tsx"] = { fg = C.teal, style = O.styles.miscs or { "italic" } },
|
||||||
|
|
||||||
|
-- yaml
|
||||||
|
["@variable.member.yaml"] = { fg = C.blue }, -- For fields.
|
||||||
|
|
||||||
|
-- Ruby
|
||||||
|
["@string.special.symbol.ruby"] = { fg = C.flamingo },
|
||||||
|
|
||||||
|
-- PHP
|
||||||
|
["@function.method.php"] = { link = "Function" },
|
||||||
|
["@function.method.call.php"] = { link = "Function" },
|
||||||
|
|
||||||
|
-- C/CPP
|
||||||
|
["@type.builtin.c"] = { fg = C.yellow, style = {} },
|
||||||
|
["@property.cpp"] = { fg = C.text },
|
||||||
|
["@type.builtin.cpp"] = { fg = C.yellow, style = {} },
|
||||||
|
|
||||||
|
-- gitcommit
|
||||||
|
["@comment.warning.gitcommit"] = { fg = C.yellow },
|
||||||
|
|
||||||
|
-- Misc
|
||||||
|
gitcommitSummary = { fg = C.rosewater, style = O.styles.miscs or { "italic" } },
|
||||||
|
zshKSHFunction = { link = "Function" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Legacy highlights
|
||||||
|
colors["@parameter"] = colors["@variable.parameter"]
|
||||||
|
colors["@field"] = colors["@variable.member"]
|
||||||
|
colors["@namespace"] = colors["@module"]
|
||||||
|
colors["@float"] = colors["@number.float"]
|
||||||
|
colors["@symbol"] = colors["@string.special.symbol"]
|
||||||
|
colors["@string.regex"] = colors["@string.regexp"]
|
||||||
|
|
||||||
|
colors["@text"] = colors["@markup"]
|
||||||
|
colors["@text.strong"] = colors["@markup.strong"]
|
||||||
|
colors["@text.emphasis"] = colors["@markup.italic"]
|
||||||
|
colors["@text.underline"] = colors["@markup.underline"]
|
||||||
|
colors["@text.strike"] = colors["@markup.strikethrough"]
|
||||||
|
colors["@text.uri"] = colors["@markup.link.url"]
|
||||||
|
colors["@text.math"] = colors["@markup.math"]
|
||||||
|
colors["@text.environment"] = colors["@markup.environment"]
|
||||||
|
colors["@text.environment.name"] = colors["@markup.environment.name"]
|
||||||
|
|
||||||
|
colors["@text.title"] = colors["@markup.heading"]
|
||||||
|
colors["@text.literal"] = colors["@markup.raw"]
|
||||||
|
colors["@text.reference"] = colors["@markup.link"]
|
||||||
|
|
||||||
|
colors["@text.todo.checked"] = colors["@markup.list.checked"]
|
||||||
|
colors["@text.todo.unchecked"] = colors["@markup.list.unchecked"]
|
||||||
|
|
||||||
|
colors["@comment.note"] = colors["@comment.hint"]
|
||||||
|
|
||||||
|
-- @text.todo is now for todo comments, not todo notes like in markdown
|
||||||
|
colors["@text.todo"] = colors["@comment.todo"]
|
||||||
|
colors["@text.warning"] = colors["@comment.warning"]
|
||||||
|
colors["@text.note"] = colors["@comment.note"]
|
||||||
|
colors["@text.danger"] = colors["@comment.error"]
|
||||||
|
|
||||||
|
-- @text.uri is now
|
||||||
|
-- > @markup.link.url in markup links
|
||||||
|
-- > @string.special.url outside of markup
|
||||||
|
colors["@text.uri"] = colors["@markup.link.uri"]
|
||||||
|
|
||||||
|
colors["@method"] = colors["@function.method"]
|
||||||
|
colors["@method.call"] = colors["@function.method.call"]
|
||||||
|
|
||||||
|
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"]
|
||||||
|
colors["@conditional"] = colors["@keyword.conditional"]
|
||||||
|
colors["@exception"] = colors["@keyword.exception"]
|
||||||
|
colors["@include"] = colors["@keyword.import"]
|
||||||
|
colors["@repeat"] = colors["@keyword.repeat"]
|
||||||
|
|
||||||
|
colors["@symbol.ruby"] = colors["@string.special.symbol.ruby"]
|
||||||
|
|
||||||
|
colors["@variable.member.yaml"] = colors["@field.yaml"]
|
||||||
|
|
||||||
|
colors["@text.title.1.markdown"] = colors["@markup.heading.1.markdown"]
|
||||||
|
colors["@text.title.2.markdown"] = colors["@markup.heading.2.markdown"]
|
||||||
|
colors["@text.title.3.markdown"] = colors["@markup.heading.3.markdown"]
|
||||||
|
colors["@text.title.4.markdown"] = colors["@markup.heading.4.markdown"]
|
||||||
|
colors["@text.title.5.markdown"] = colors["@markup.heading.5.markdown"]
|
||||||
|
colors["@text.title.6.markdown"] = colors["@markup.heading.6.markdown"]
|
||||||
|
|
||||||
|
colors["@method.php"] = colors["@function.method.php"]
|
||||||
|
colors["@method.call.php"] = colors["@function.method.call.php"]
|
||||||
|
|
||||||
|
return colors
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return O.transparent_background and {
|
||||||
|
TreesitterContextBottom = { sp = C.dim, style = { "underline" } },
|
||||||
|
} or {
|
||||||
|
TreesitterContextBottom = {
|
||||||
|
sp = C.surface0,
|
||||||
|
style = { "underline" },
|
||||||
|
},
|
||||||
|
TreesitterContextLineNumber = {
|
||||||
|
fg = C.surface1,
|
||||||
|
bg = C.mantle,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
rainbowcol1 = { fg = C.red },
|
||||||
|
rainbowcol2 = { fg = C.teal },
|
||||||
|
rainbowcol3 = { fg = C.yellow },
|
||||||
|
rainbowcol4 = { fg = C.blue },
|
||||||
|
rainbowcol5 = { fg = C.pink },
|
||||||
|
rainbowcol6 = { fg = C.flamingo },
|
||||||
|
rainbowcol7 = { fg = C.green },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
TSRainbowRed = { fg = C.red },
|
||||||
|
TSRainbowYellow = { fg = C.yellow },
|
||||||
|
TSRainbowBlue = { fg = C.blue },
|
||||||
|
TSRainbowOrange = { fg = C.peach },
|
||||||
|
TSRainbowGreen = { fg = C.green },
|
||||||
|
TSRainbowViolet = { fg = C.mauve },
|
||||||
|
TSRainbowCyan = { fg = C.teal },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.get = function()
|
||||||
|
return {
|
||||||
|
UfoFoldedFg = { fg = C.lavender },
|
||||||
|
UfoFoldedEllipsis = { fg = C.crust, bg = C.blue },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
Sneak = { fg = C.overlay2, bg = C.pink },
|
||||||
|
SneakScope = { bg = C.text },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
VimwikiLink = { fg = C.sky, bg = C.none },
|
||||||
|
VimwikiHeaderChar = { fg = C.grey, bg = C.none },
|
||||||
|
VimwikiHR = { fg = C.yellow, bg = C.none },
|
||||||
|
VimwikiList = { fg = C.peach, bg = C.none },
|
||||||
|
VimwikiTag = { fg = C.peach, bg = C.none },
|
||||||
|
VimwikiMarkers = { fg = C.subtext0, bg = C.none },
|
||||||
|
VimwikiHeader1 = { fg = C.peach, bg = C.none, style = { "bold" } },
|
||||||
|
VimwikiHeader2 = { fg = C.green, bg = C.none, style = { "bold" } },
|
||||||
|
VimwikiHeader3 = { fg = C.blue, bg = C.none, style = { "bold" } },
|
||||||
|
VimwikiHeader4 = { fg = C.sky, bg = C.none, style = { "bold" } },
|
||||||
|
VimwikiHeader5 = { fg = C.yellow, bg = C.none, style = { "bold" } },
|
||||||
|
VimwikiHeader6 = { fg = C.mauve, bg = C.none, style = { "bold" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
WhichKey = { link = "NormalFloat" },
|
||||||
|
WhichKeyBorder = { link = "FloatBorder" },
|
||||||
|
|
||||||
|
WhichKeyGroup = { fg = C.blue },
|
||||||
|
WhichKeySeparator = { fg = C.overlay0 },
|
||||||
|
WhichKeyDesc = { fg = C.pink },
|
||||||
|
WhichKeyValue = { fg = C.overlay0 },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
WindowPickerStatusLine = { fg = C.red, style = { "bold" } },
|
||||||
|
WindowPickerStatusLineNC = { fg = C.red, style = { "bold" } },
|
||||||
|
WindowPickerWinBar = { fg = C.red, style = { "bold" } },
|
||||||
|
WindowPickerWinBarNC = { fg = C.red, style = { "bold" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
Comment = { fg = C.overlay0, style = O.styles.comments }, -- just comments
|
||||||
|
SpecialComment = { link = "Special" }, -- special things inside a comment
|
||||||
|
Constant = { fg = C.peach }, -- (preferred) any constant
|
||||||
|
String = { fg = C.green, style = O.styles.strings or {} }, -- a string constant: "this is a string"
|
||||||
|
Character = { fg = C.teal }, -- a character constant: 'c', '\n'
|
||||||
|
Number = { fg = C.peach, style = O.styles.numbers or {} }, -- a number constant: 234, 0xff
|
||||||
|
Float = { link = "Number" }, -- a floating point constant: 2.3e10
|
||||||
|
Boolean = { fg = C.peach, style = O.styles.booleans or {} }, -- a boolean constant: TRUE, false
|
||||||
|
Identifier = { fg = C.flamingo, style = O.styles.variables or {} }, -- (preferred) any variable name
|
||||||
|
Function = { fg = C.blue, style = O.styles.functions or {} }, -- function name (also: methods for classes)
|
||||||
|
Statement = { fg = C.mauve }, -- (preferred) any statement
|
||||||
|
Conditional = { fg = C.mauve, style = O.styles.conditionals or {} }, -- if, then, else, endif, switch, etc.
|
||||||
|
Repeat = { fg = C.mauve, style = O.styles.loops or {} }, -- for, do, while, etc.
|
||||||
|
Label = { fg = C.sapphire }, -- case, default, etc.
|
||||||
|
Operator = { fg = C.sky, style = O.styles.operators or {} }, -- "sizeof", "+", "*", etc.
|
||||||
|
Keyword = { fg = C.mauve, style = O.styles.keywords or {} }, -- any other keyword
|
||||||
|
Exception = { fg = C.mauve, style = O.styles.keywords or {} }, -- try, catch, throw
|
||||||
|
|
||||||
|
PreProc = { fg = C.pink }, -- (preferred) generic Preprocessor
|
||||||
|
Include = { fg = C.mauve, style = O.styles.keywords or {} }, -- preprocessor #include
|
||||||
|
Define = { link = "PreProc" }, -- preprocessor #define
|
||||||
|
Macro = { fg = C.mauve }, -- same as Define
|
||||||
|
PreCondit = { link = "PreProc" }, -- preprocessor #if, #else, #endif, etc.
|
||||||
|
|
||||||
|
StorageClass = { fg = C.yellow }, -- static, register, volatile, etc.
|
||||||
|
Structure = { fg = C.yellow }, -- struct, union, enum, etc.
|
||||||
|
Special = { fg = C.pink }, -- (preferred) any special symbol
|
||||||
|
Type = { fg = C.yellow, style = O.styles.types or {} }, -- (preferred) int, long, char, etc.
|
||||||
|
Typedef = { link = "Type" }, -- A typedef
|
||||||
|
SpecialChar = { link = "Special" }, -- special character in a constant
|
||||||
|
Tag = { fg = C.lavender, style = { "bold" } }, -- you can use CTRL-] on this
|
||||||
|
Delimiter = { fg = C.overlay2 }, -- character that needs attention
|
||||||
|
Debug = { link = "Special" }, -- debugging statements
|
||||||
|
|
||||||
|
Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links
|
||||||
|
Bold = { style = { "bold" } },
|
||||||
|
Italic = { style = { "italic" } },
|
||||||
|
-- ("Ignore", below, may be invisible...)
|
||||||
|
-- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore|
|
||||||
|
|
||||||
|
Error = { fg = C.red }, -- (preferred) any erroneous construct
|
||||||
|
Todo = { bg = C.flamingo, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
|
||||||
|
qfLineNr = { fg = C.yellow },
|
||||||
|
qfFileName = { fg = C.blue },
|
||||||
|
htmlH1 = { fg = C.pink, style = { "bold" } },
|
||||||
|
htmlH2 = { fg = C.blue, style = { "bold" } },
|
||||||
|
-- mkdHeading = { fg = C.peach, style = { "bold" } },
|
||||||
|
-- mkdCode = { bg = C.terminal_black, fg = C.text },
|
||||||
|
mkdCodeDelimiter = { bg = C.base, fg = C.text },
|
||||||
|
mkdCodeStart = { fg = C.flamingo, style = { "bold" } },
|
||||||
|
mkdCodeEnd = { fg = C.flamingo, style = { "bold" } },
|
||||||
|
-- mkdLink = { fg = C.blue, style = { "underline" } },
|
||||||
|
|
||||||
|
-- debugging
|
||||||
|
debugPC = { bg = O.transparent_background and C.none or C.crust }, -- used for highlighting the current line in terminal-debug
|
||||||
|
debugBreakpoint = { bg = C.base, fg = C.overlay0 }, -- used for breakpoint colors in terminal-debug
|
||||||
|
-- illuminate
|
||||||
|
illuminatedWord = { bg = C.surface1 },
|
||||||
|
illuminatedCurWord = { bg = C.surface1 },
|
||||||
|
-- diff
|
||||||
|
diffAdded = { fg = C.green },
|
||||||
|
diffRemoved = { fg = C.red },
|
||||||
|
diffChanged = { fg = C.blue },
|
||||||
|
diffOldFile = { fg = C.yellow },
|
||||||
|
diffNewFile = { fg = C.peach },
|
||||||
|
diffFile = { fg = C.blue },
|
||||||
|
diffLine = { fg = C.overlay0 },
|
||||||
|
diffIndexLine = { fg = C.teal },
|
||||||
|
DiffAdd = { bg = U.darken(C.green, 0.18, C.base) }, -- diff mode: Added line |diff.txt|
|
||||||
|
DiffChange = { bg = U.darken(C.blue, 0.07, C.base) }, -- diff mode: Changed line |diff.txt|
|
||||||
|
DiffDelete = { bg = U.darken(C.red, 0.18, C.base) }, -- diff mode: Deleted line |diff.txt|
|
||||||
|
DiffText = { bg = U.darken(C.blue, 0.30, C.base) }, -- diff mode: Changed text within a changed line |diff.txt|
|
||||||
|
-- NeoVim
|
||||||
|
healthError = { fg = C.red },
|
||||||
|
healthSuccess = { fg = C.teal },
|
||||||
|
healthWarning = { fg = C.yellow },
|
||||||
|
-- misc
|
||||||
|
|
||||||
|
-- glyphs
|
||||||
|
GlyphPalette1 = { fg = C.red },
|
||||||
|
GlyphPalette2 = { fg = C.teal },
|
||||||
|
GlyphPalette3 = { fg = C.yellow },
|
||||||
|
GlyphPalette4 = { fg = C.blue },
|
||||||
|
GlyphPalette6 = { fg = C.teal },
|
||||||
|
GlyphPalette7 = { fg = C.text },
|
||||||
|
GlyphPalette9 = { fg = C.red },
|
||||||
|
|
||||||
|
-- rainbow
|
||||||
|
rainbow1 = { fg = C.red },
|
||||||
|
rainbow2 = { fg = C.peach },
|
||||||
|
rainbow3 = { fg = C.yellow },
|
||||||
|
rainbow4 = { fg = C.green },
|
||||||
|
rainbow5 = { fg = C.sapphire },
|
||||||
|
rainbow6 = { fg = C.lavender },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
terminal_color_0 = C.overlay0,
|
||||||
|
terminal_color_8 = C.overlay1,
|
||||||
|
|
||||||
|
terminal_color_1 = C.red,
|
||||||
|
terminal_color_9 = C.red,
|
||||||
|
|
||||||
|
terminal_color_2 = C.green,
|
||||||
|
terminal_color_10 = C.green,
|
||||||
|
|
||||||
|
terminal_color_3 = C.yellow,
|
||||||
|
terminal_color_11 = C.yellow,
|
||||||
|
|
||||||
|
terminal_color_4 = C.blue,
|
||||||
|
terminal_color_12 = C.blue,
|
||||||
|
|
||||||
|
terminal_color_5 = C.pink,
|
||||||
|
terminal_color_13 = C.pink,
|
||||||
|
|
||||||
|
terminal_color_6 = C.sky,
|
||||||
|
terminal_color_14 = C.sky,
|
||||||
|
|
||||||
|
terminal_color_7 = C.text,
|
||||||
|
terminal_color_15 = C.text,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,231 @@
|
|||||||
|
local is_vim = vim.fn.has "nvim" ~= 1
|
||||||
|
if is_vim then require "catppuccin.lib.vim" end
|
||||||
|
|
||||||
|
---@type Catppuccin
|
||||||
|
local M = {
|
||||||
|
default_options = {
|
||||||
|
flavour = "auto",
|
||||||
|
background = {
|
||||||
|
light = "latte",
|
||||||
|
dark = "mocha",
|
||||||
|
},
|
||||||
|
compile_path = vim.fn.stdpath "cache" .. "/catppuccin",
|
||||||
|
transparent_background = false,
|
||||||
|
show_end_of_buffer = false,
|
||||||
|
term_colors = false,
|
||||||
|
kitty = vim.env.KITTY_WINDOW_ID and true or false,
|
||||||
|
dim_inactive = {
|
||||||
|
enabled = false,
|
||||||
|
shade = "dark",
|
||||||
|
percentage = 0.15,
|
||||||
|
},
|
||||||
|
no_italic = false,
|
||||||
|
no_bold = false,
|
||||||
|
no_underline = false,
|
||||||
|
styles = {
|
||||||
|
comments = { "italic" },
|
||||||
|
conditionals = { "italic" },
|
||||||
|
loops = {},
|
||||||
|
functions = {},
|
||||||
|
keywords = {},
|
||||||
|
strings = {},
|
||||||
|
variables = {},
|
||||||
|
numbers = {},
|
||||||
|
booleans = {},
|
||||||
|
properties = {},
|
||||||
|
types = {},
|
||||||
|
operators = {},
|
||||||
|
},
|
||||||
|
default_integrations = true,
|
||||||
|
integrations = {
|
||||||
|
alpha = true,
|
||||||
|
cmp = true,
|
||||||
|
dap = true,
|
||||||
|
dap_ui = true,
|
||||||
|
dashboard = true,
|
||||||
|
diffview = false,
|
||||||
|
flash = true,
|
||||||
|
gitsigns = true,
|
||||||
|
markdown = true,
|
||||||
|
neogit = true,
|
||||||
|
neotree = true,
|
||||||
|
nvimtree = true,
|
||||||
|
ufo = true,
|
||||||
|
rainbow_delimiters = true,
|
||||||
|
semantic_tokens = not is_vim,
|
||||||
|
telescope = { enabled = true },
|
||||||
|
treesitter = not is_vim,
|
||||||
|
treesitter_context = true,
|
||||||
|
barbecue = {
|
||||||
|
dim_dirname = true,
|
||||||
|
bold_basename = true,
|
||||||
|
dim_context = false,
|
||||||
|
alt_background = false,
|
||||||
|
},
|
||||||
|
illuminate = {
|
||||||
|
enabled = true,
|
||||||
|
lsp = false,
|
||||||
|
},
|
||||||
|
indent_blankline = {
|
||||||
|
enabled = true,
|
||||||
|
scope_color = "",
|
||||||
|
colored_indent_levels = false,
|
||||||
|
},
|
||||||
|
native_lsp = {
|
||||||
|
enabled = true,
|
||||||
|
virtual_text = {
|
||||||
|
errors = { "italic" },
|
||||||
|
hints = { "italic" },
|
||||||
|
warnings = { "italic" },
|
||||||
|
information = { "italic" },
|
||||||
|
},
|
||||||
|
underlines = {
|
||||||
|
errors = { "underline" },
|
||||||
|
hints = { "underline" },
|
||||||
|
warnings = { "underline" },
|
||||||
|
information = { "underline" },
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
navic = {
|
||||||
|
enabled = false,
|
||||||
|
custom_bg = "NONE",
|
||||||
|
},
|
||||||
|
dropbar = {
|
||||||
|
enabled = true,
|
||||||
|
color_mode = false,
|
||||||
|
},
|
||||||
|
colorful_winsep = {
|
||||||
|
enabled = false,
|
||||||
|
color = "red",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color_overrides = {},
|
||||||
|
highlight_overrides = {},
|
||||||
|
},
|
||||||
|
flavours = { latte = 1, frappe = 2, macchiato = 3, mocha = 4 },
|
||||||
|
path_sep = jit and (jit.os == "Windows" and "\\" or "/") or package.config:sub(1, 1),
|
||||||
|
}
|
||||||
|
|
||||||
|
M.options = M.default_options
|
||||||
|
|
||||||
|
function M.compile()
|
||||||
|
local user_flavour = M.flavour
|
||||||
|
for flavour, _ in pairs(M.flavours) do
|
||||||
|
M.flavour = flavour
|
||||||
|
require("catppuccin.lib." .. (is_vim and "vim." or "") .. "compiler").compile(flavour)
|
||||||
|
end
|
||||||
|
M.flavour = user_flavour -- Restore user flavour after compile
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_flavour(default)
|
||||||
|
local flavour
|
||||||
|
if default and default == M.flavour and vim.o.background ~= (M.flavour == "latte" and "light" or "dark") then
|
||||||
|
flavour = M.options.background[vim.o.background]
|
||||||
|
else
|
||||||
|
flavour = default
|
||||||
|
end
|
||||||
|
|
||||||
|
if flavour and not M.flavours[flavour] then
|
||||||
|
vim.notify(
|
||||||
|
string.format(
|
||||||
|
"Catppuccin (error): Invalid flavour '%s', flavour must be 'latte', 'frappe', 'macchiato', 'mocha' or 'auto'",
|
||||||
|
flavour
|
||||||
|
),
|
||||||
|
vim.log.levels.ERROR
|
||||||
|
)
|
||||||
|
flavour = nil
|
||||||
|
end
|
||||||
|
return flavour or M.options.flavour or vim.g.catppuccin_flavour or M.options.background[vim.o.background]
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if not did_setup then M.setup() end
|
||||||
|
M.flavour = get_flavour(flavour)
|
||||||
|
local compiled_path = M.options.compile_path .. M.path_sep .. M.flavour
|
||||||
|
local f = loadfile(compiled_path)
|
||||||
|
if not f then
|
||||||
|
M.compile()
|
||||||
|
f = assert(loadfile(compiled_path), "could not load cache")
|
||||||
|
end
|
||||||
|
f(flavour or M.options.flavour or vim.g.catppuccin_flavour)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@type fun(user_conf: CatppuccinOptions?)
|
||||||
|
function M.setup(user_conf)
|
||||||
|
did_setup = true
|
||||||
|
-- Parsing user config
|
||||||
|
user_conf = user_conf or {}
|
||||||
|
|
||||||
|
if user_conf.default_integrations == false then M.default_options.integrations = {} end
|
||||||
|
|
||||||
|
M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options)
|
||||||
|
M.options.highlight_overrides.all = user_conf.custom_highlights or M.options.highlight_overrides.all
|
||||||
|
|
||||||
|
-- Get cached hash
|
||||||
|
local cached_path = M.options.compile_path .. M.path_sep .. "cached"
|
||||||
|
local file = io.open(cached_path)
|
||||||
|
local cached = nil
|
||||||
|
if file then
|
||||||
|
cached = file:read()
|
||||||
|
file:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get current hash
|
||||||
|
local git_path = debug.getinfo(1).source:sub(2, -24) .. ".git"
|
||||||
|
local git = vim.fn.getftime(git_path) -- 2x faster vim.loop.fs_stat
|
||||||
|
local hash = require("catppuccin.lib.hashing").hash(user_conf)
|
||||||
|
.. (git == -1 and git_path or git) -- no .git in /nix/store -> cache path
|
||||||
|
.. (vim.o.winblend == 0 and 1 or 0) -- :h winblend
|
||||||
|
.. (vim.o.pumblend == 0 and 1 or 0) -- :h pumblend
|
||||||
|
|
||||||
|
-- Recompile if hash changed
|
||||||
|
if cached ~= hash then
|
||||||
|
M.compile()
|
||||||
|
file = io.open(cached_path, "wb")
|
||||||
|
if file then
|
||||||
|
file:write(hash)
|
||||||
|
file:close()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_vim then return M end
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command(
|
||||||
|
"Catppuccin",
|
||||||
|
function(inp) vim.api.nvim_command("colorscheme catppuccin-" .. get_flavour(inp.args)) end,
|
||||||
|
{
|
||||||
|
nargs = 1,
|
||||||
|
complete = function(line)
|
||||||
|
return vim.tbl_filter(function(val) return vim.startswith(val, line) end, vim.tbl_keys(M.flavours))
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("CatppuccinCompile", function()
|
||||||
|
for name, _ in pairs(package.loaded) do
|
||||||
|
if name:match "^catppuccin." then package.loaded[name] = nil end
|
||||||
|
end
|
||||||
|
M.compile()
|
||||||
|
vim.notify("Catppuccin (info): compiled cache!", vim.log.levels.INFO)
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
if vim.g.catppuccin_debug then
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = "*/catppuccin/*",
|
||||||
|
callback = function()
|
||||||
|
vim.schedule(function() vim.cmd "CatppuccinCompile" end)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
local path_sep = require("catppuccin").path_sep
|
||||||
|
local O = require("catppuccin").options
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- Credit: https://github.com/EdenEast/nightfox.nvim
|
||||||
|
local fmt = string.format
|
||||||
|
|
||||||
|
local function inspect(t)
|
||||||
|
local list = {}
|
||||||
|
for k, v in pairs(t) do
|
||||||
|
local tv = type(v)
|
||||||
|
if tv == "string" then
|
||||||
|
table.insert(list, fmt([[%s = "%s"]], k, v))
|
||||||
|
elseif tv == "table" then
|
||||||
|
table.insert(list, fmt([[%s = %s]], k, inspect(v)))
|
||||||
|
else
|
||||||
|
table.insert(list, fmt([[%s = %s]], k, tostring(v)))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return fmt([[{ %s }]], table.concat(list, ", "))
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.compile(flavour)
|
||||||
|
local theme = require("catppuccin.lib.mapper").apply(flavour)
|
||||||
|
local lines = {
|
||||||
|
string.format(
|
||||||
|
[[
|
||||||
|
return string.dump(function(flavour)
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
if vim.g.colors_name then vim.cmd("hi clear") end
|
||||||
|
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",
|
||||||
|
flavour
|
||||||
|
),
|
||||||
|
}
|
||||||
|
if path_sep == "\\" then O.compile_path = O.compile_path:gsub("/", "\\") end
|
||||||
|
|
||||||
|
local tbl = vim.tbl_deep_extend("keep", theme.custom_highlights, theme.integrations, theme.syntax, theme.editor)
|
||||||
|
|
||||||
|
if O.term_colors == true then
|
||||||
|
for k, v in pairs(theme.terminal) do
|
||||||
|
table.insert(lines, fmt('vim.g.%s = "%s"', k, v))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for group, color in pairs(tbl) do
|
||||||
|
if color.style then
|
||||||
|
for _, style in pairs(color.style) do
|
||||||
|
color[style] = true
|
||||||
|
if O.no_italic and style == "italic" then color[style] = false end
|
||||||
|
if O.no_bold and style == "bold" then color[style] = false end
|
||||||
|
if O.no_underline and style == "underline" then color[style] = false end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
color.style = nil
|
||||||
|
if color.link and (theme.custom_highlights[group] and not theme.custom_highlights[group].link) then
|
||||||
|
color.link = nil
|
||||||
|
end
|
||||||
|
table.insert(lines, fmt([[h(0, "%s", %s)]], group, inspect(color)))
|
||||||
|
end
|
||||||
|
table.insert(lines, "end, true)")
|
||||||
|
if vim.fn.isdirectory(O.compile_path) == 0 then vim.fn.mkdir(O.compile_path, "p") end
|
||||||
|
|
||||||
|
if vim.g.catppuccin_debug then -- Debugging purpose
|
||||||
|
local deb = io.open(O.compile_path .. path_sep .. flavour .. ".lua", "wb")
|
||||||
|
if deb then
|
||||||
|
deb:write(table.concat(lines, "\n"))
|
||||||
|
deb:close()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local f = loadstring(table.concat(lines, "\n"))
|
||||||
|
if not f then
|
||||||
|
local err_path = (path_sep == "/" and "/tmp" or os.getenv "TMP") .. "/catppuccin_error.lua"
|
||||||
|
print(string.format(
|
||||||
|
[[Catppuccin (error): Most likely some mistake made in your catppuccin config
|
||||||
|
You can open %s for debugging
|
||||||
|
|
||||||
|
If you think this is a bug, kindly open an issue and attach %s file
|
||||||
|
Below is the error message that we captured:
|
||||||
|
]],
|
||||||
|
err_path,
|
||||||
|
err_path
|
||||||
|
))
|
||||||
|
local err = io.open(err_path, "wb")
|
||||||
|
if err then
|
||||||
|
err:write(table.concat(lines, "\n"))
|
||||||
|
err:close()
|
||||||
|
end
|
||||||
|
dofile(err_path)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local file = assert(
|
||||||
|
io.open(O.compile_path .. path_sep .. flavour, "wb"),
|
||||||
|
"Permission denied while writing compiled file to " .. O.compile_path .. path_sep .. flavour
|
||||||
|
)
|
||||||
|
file:write(f())
|
||||||
|
file:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
local M = {}
|
||||||
|
local B = bit or bit32 or require "catppuccin.lib.vim.bit"
|
||||||
|
|
||||||
|
local hash_str = function(str) -- djb2, https://theartincode.stanis.me/008-djb2/
|
||||||
|
local hash = 5381
|
||||||
|
for i = 1, #str do
|
||||||
|
hash = B.lshift(hash, 5) + hash + string.byte(str, i)
|
||||||
|
end
|
||||||
|
return hash
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.hash(v) -- Xor hashing: https://codeforces.com/blog/entry/85900
|
||||||
|
local t = type(v)
|
||||||
|
if t == "table" then
|
||||||
|
local hash = 0
|
||||||
|
for p, u in next, v do
|
||||||
|
hash = B.bxor(hash, hash_str(p .. M.hash(u)))
|
||||||
|
end
|
||||||
|
return hash
|
||||||
|
elseif t == "function" then
|
||||||
|
return M.hash(v(require("catppuccin.palettes").get_palette()))
|
||||||
|
end
|
||||||
|
return tostring(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
-- DEPRECATED MODULE
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.highlight(group, color)
|
||||||
|
if color.style then
|
||||||
|
for _, style in ipairs(color.style) do
|
||||||
|
color[style] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
color.style = nil
|
||||||
|
vim.api.nvim_set_hl(0, group, color)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.syntax(tbl)
|
||||||
|
for group, colors in pairs(tbl) do
|
||||||
|
M.highlight(group, colors)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,290 @@
|
|||||||
|
--[[
|
||||||
|
Lua implementation of HSLuv and HPLuv color spaces
|
||||||
|
Homepage: http://www.hsluv.org/
|
||||||
|
|
||||||
|
Copyright (C) 2019 Alexei Boronine
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||||
|
following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||||
|
portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
]]
|
||||||
|
local hsluv = {}
|
||||||
|
|
||||||
|
hsluv.hexChars = "0123456789abcdef"
|
||||||
|
|
||||||
|
local distance_line_from_origin = function(line) return math.abs(line.intercept) / math.sqrt((line.slope ^ 2) + 1) end
|
||||||
|
|
||||||
|
local length_of_ray_until_intersect = function(theta, line)
|
||||||
|
return line.intercept / (math.sin(theta) - line.slope * math.cos(theta))
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.get_bounds = function(l)
|
||||||
|
local result = {}
|
||||||
|
local sub2
|
||||||
|
local sub1 = ((l + 16) ^ 3) / 1560896
|
||||||
|
if sub1 > hsluv.epsilon then
|
||||||
|
sub2 = sub1
|
||||||
|
else
|
||||||
|
sub2 = l / hsluv.kappa
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 1, 3 do
|
||||||
|
local m1 = hsluv.m[i][1]
|
||||||
|
local m2 = hsluv.m[i][2]
|
||||||
|
local m3 = hsluv.m[i][3]
|
||||||
|
|
||||||
|
for t = 0, 1 do
|
||||||
|
local top1 = (284517 * m1 - 94839 * m3) * sub2
|
||||||
|
local top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * l * sub2 - 769860 * t * l
|
||||||
|
local bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t
|
||||||
|
table.insert(result, { slope = top1 / bottom, intercept = top2 / bottom })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.max_safe_chroma_for_l = function(l)
|
||||||
|
local bounds = hsluv.get_bounds(l)
|
||||||
|
local min = 1.7976931348623157e+308
|
||||||
|
|
||||||
|
for i = 1, 6 do
|
||||||
|
local length = distance_line_from_origin(bounds[i])
|
||||||
|
if length >= 0 then min = math.min(min, length) end
|
||||||
|
end
|
||||||
|
return min
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.max_safe_chroma_for_lh = function(l, h)
|
||||||
|
local hrad = h / 360 * math.pi * 2
|
||||||
|
local bounds = hsluv.get_bounds(l)
|
||||||
|
local min = 1.7976931348623157e+308
|
||||||
|
|
||||||
|
for i = 1, 6 do
|
||||||
|
local bound = bounds[i]
|
||||||
|
local length = length_of_ray_until_intersect(hrad, bound)
|
||||||
|
if length >= 0 then min = math.min(min, length) end
|
||||||
|
end
|
||||||
|
return min
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.dot_product = function(a, b)
|
||||||
|
local sum = 0
|
||||||
|
for i = 1, 3 do
|
||||||
|
sum = sum + a[i] * b[i]
|
||||||
|
end
|
||||||
|
return sum
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.from_linear = function(c)
|
||||||
|
if c <= 0.0031308 then
|
||||||
|
return 12.92 * c
|
||||||
|
else
|
||||||
|
return 1.055 * (c ^ 0.416666666666666685) - 0.055
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.to_linear = function(c)
|
||||||
|
if c > 0.04045 then
|
||||||
|
return ((c + 0.055) / 1.055) ^ 2.4
|
||||||
|
else
|
||||||
|
return c / 12.92
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.xyz_to_rgb = function(tuple)
|
||||||
|
return {
|
||||||
|
hsluv.from_linear(hsluv.dot_product(hsluv.m[1], tuple)),
|
||||||
|
hsluv.from_linear(hsluv.dot_product(hsluv.m[2], tuple)),
|
||||||
|
hsluv.from_linear(hsluv.dot_product(hsluv.m[3], tuple)),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.rgb_to_xyz = function(tuple)
|
||||||
|
local rgbl = { hsluv.to_linear(tuple[1]), hsluv.to_linear(tuple[2]), hsluv.to_linear(tuple[3]) }
|
||||||
|
return {
|
||||||
|
hsluv.dot_product(hsluv.minv[1], rgbl),
|
||||||
|
hsluv.dot_product(hsluv.minv[2], rgbl),
|
||||||
|
hsluv.dot_product(hsluv.minv[3], rgbl),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.y_to_l = function(Y)
|
||||||
|
if Y <= hsluv.epsilon then
|
||||||
|
return Y / hsluv.refY * hsluv.kappa
|
||||||
|
else
|
||||||
|
return 116 * ((Y / hsluv.refY) ^ 0.333333333333333315) - 16
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.l_to_y = function(L)
|
||||||
|
if L <= 8 then
|
||||||
|
return hsluv.refY * L / hsluv.kappa
|
||||||
|
else
|
||||||
|
return hsluv.refY * (((L + 16) / 116) ^ 3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.xyz_to_luv = function(tuple)
|
||||||
|
local X = tuple[1]
|
||||||
|
local Y = tuple[2]
|
||||||
|
local divider = X + 15 * Y + 3 * tuple[3]
|
||||||
|
local varU = 4 * X
|
||||||
|
local varV = 9 * Y
|
||||||
|
if divider ~= 0 then
|
||||||
|
varU = varU / divider
|
||||||
|
varV = varV / divider
|
||||||
|
else
|
||||||
|
varU = 0
|
||||||
|
varV = 0
|
||||||
|
end
|
||||||
|
local L = hsluv.y_to_l(Y)
|
||||||
|
if L == 0 then return { 0, 0, 0 } end
|
||||||
|
return { L, 13 * L * (varU - hsluv.refU), 13 * L * (varV - hsluv.refV) }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.luv_to_xyz = function(tuple)
|
||||||
|
local L = tuple[1]
|
||||||
|
local U = tuple[2]
|
||||||
|
local V = tuple[3]
|
||||||
|
if L == 0 then return { 0, 0, 0 } end
|
||||||
|
local varU = U / (13 * L) + hsluv.refU
|
||||||
|
local varV = V / (13 * L) + hsluv.refV
|
||||||
|
local Y = hsluv.l_to_y(L)
|
||||||
|
local X = 0 - (9 * Y * varU) / (((varU - 4) * varV) - varU * varV)
|
||||||
|
return { X, Y, (9 * Y - 15 * varV * Y - varV * X) / (3 * varV) }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.luv_to_lch = function(tuple)
|
||||||
|
local L = tuple[1]
|
||||||
|
local U = tuple[2]
|
||||||
|
local V = tuple[3]
|
||||||
|
local C = math.sqrt(U * U + V * V)
|
||||||
|
local H
|
||||||
|
if C < 0.00000001 then
|
||||||
|
H = 0
|
||||||
|
else
|
||||||
|
H = math.atan2(V, U) * 180.0 / 3.1415926535897932
|
||||||
|
if H < 0 then H = 360 + H end
|
||||||
|
end
|
||||||
|
return { L, C, H }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.lch_to_luv = function(tuple)
|
||||||
|
local L = tuple[1]
|
||||||
|
local C = tuple[2]
|
||||||
|
local Hrad = tuple[3] / 360.0 * 2 * math.pi
|
||||||
|
return { L, math.cos(Hrad) * C, math.sin(Hrad) * C }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.hsluv_to_lch = function(tuple)
|
||||||
|
local H = tuple[1]
|
||||||
|
local S = tuple[2]
|
||||||
|
local L = tuple[3]
|
||||||
|
if L > 99.9999999 then return { 100, 0, H } end
|
||||||
|
if L < 0.00000001 then return { 0, 0, H } end
|
||||||
|
return { L, hsluv.max_safe_chroma_for_lh(L, H) / 100 * S, H }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.lch_to_hsluv = function(tuple)
|
||||||
|
local L = tuple[1]
|
||||||
|
local C = tuple[2]
|
||||||
|
local H = tuple[3]
|
||||||
|
local max_chroma = hsluv.max_safe_chroma_for_lh(L, H)
|
||||||
|
if L > 99.9999999 then return { H, 0, 100 } end
|
||||||
|
if L < 0.00000001 then return { H, 0, 0 } end
|
||||||
|
|
||||||
|
return { H, C / max_chroma * 100, L }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.hpluv_to_lch = function(tuple)
|
||||||
|
local H = tuple[1]
|
||||||
|
local S = tuple[2]
|
||||||
|
local L = tuple[3]
|
||||||
|
if L > 99.9999999 then return { 100, 0, H } end
|
||||||
|
if L < 0.00000001 then return { 0, 0, H } end
|
||||||
|
return { L, hsluv.max_safe_chroma_for_l(L) / 100 * S, H }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.lch_to_hpluv = function(tuple)
|
||||||
|
local L = tuple[1]
|
||||||
|
local C = tuple[2]
|
||||||
|
local H = tuple[3]
|
||||||
|
if L > 99.9999999 then return { H, 0, 100 } end
|
||||||
|
if L < 0.00000001 then return { H, 0, 0 } end
|
||||||
|
return { H, C / hsluv.max_safe_chroma_for_l(L) * 100, L }
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.rgb_to_hex = function(tuple)
|
||||||
|
local h = "#"
|
||||||
|
for i = 1, 3 do
|
||||||
|
local c = math.floor(tuple[i] * 255 + 0.5)
|
||||||
|
local digit2 = math.fmod(c, 16)
|
||||||
|
local x = (c - digit2) / 16
|
||||||
|
local digit1 = math.floor(x)
|
||||||
|
h = h .. string.sub(hsluv.hexChars, digit1 + 1, digit1 + 1)
|
||||||
|
h = h .. string.sub(hsluv.hexChars, digit2 + 1, digit2 + 1)
|
||||||
|
end
|
||||||
|
return h
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.hex_to_rgb = function(hex)
|
||||||
|
hex = string.lower(hex)
|
||||||
|
local ret = {}
|
||||||
|
for i = 0, 2 do
|
||||||
|
local char1 = string.sub(hex, i * 2 + 2, i * 2 + 2)
|
||||||
|
local char2 = string.sub(hex, i * 2 + 3, i * 2 + 3)
|
||||||
|
local digit1 = string.find(hsluv.hexChars, char1) - 1
|
||||||
|
local digit2 = string.find(hsluv.hexChars, char2) - 1
|
||||||
|
ret[i + 1] = (digit1 * 16 + digit2) / 255.0
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
hsluv.lch_to_rgb = function(tuple) return hsluv.xyz_to_rgb(hsluv.luv_to_xyz(hsluv.lch_to_luv(tuple))) end
|
||||||
|
|
||||||
|
hsluv.rgb_to_lch = function(tuple) return hsluv.luv_to_lch(hsluv.xyz_to_luv(hsluv.rgb_to_xyz(tuple))) end
|
||||||
|
|
||||||
|
hsluv.hsluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hsluv_to_lch(tuple)) end
|
||||||
|
|
||||||
|
hsluv.rgb_to_hsluv = function(tuple) return hsluv.lch_to_hsluv(hsluv.rgb_to_lch(tuple)) end
|
||||||
|
|
||||||
|
hsluv.hpluv_to_rgb = function(tuple) return hsluv.lch_to_rgb(hsluv.hpluv_to_lch(tuple)) end
|
||||||
|
|
||||||
|
hsluv.rgb_to_hpluv = function(tuple) return hsluv.lch_to_hpluv(hsluv.rgb_to_lch(tuple)) end
|
||||||
|
|
||||||
|
hsluv.hsluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hsluv_to_rgb(tuple)) end
|
||||||
|
|
||||||
|
hsluv.hpluv_to_hex = function(tuple) return hsluv.rgb_to_hex(hsluv.hpluv_to_rgb(tuple)) end
|
||||||
|
|
||||||
|
hsluv.hex_to_hsluv = function(s) return hsluv.rgb_to_hsluv(hsluv.hex_to_rgb(s)) end
|
||||||
|
|
||||||
|
hsluv.hex_to_hpluv = function(s) return hsluv.rgb_to_hpluv(hsluv.hex_to_rgb(s)) end
|
||||||
|
|
||||||
|
hsluv.m = {
|
||||||
|
{ 3.240969941904521, -1.537383177570093, -0.498610760293 },
|
||||||
|
{ -0.96924363628087, 1.87596750150772, 0.041555057407175 },
|
||||||
|
{ 0.055630079696993, -0.20397695888897, 1.056971514242878 },
|
||||||
|
}
|
||||||
|
hsluv.minv = {
|
||||||
|
{ 0.41239079926595, 0.35758433938387, 0.18048078840183 },
|
||||||
|
{ 0.21263900587151, 0.71516867876775, 0.072192315360733 },
|
||||||
|
{ 0.019330818715591, 0.11919477979462, 0.95053215224966 },
|
||||||
|
}
|
||||||
|
hsluv.refY = 1.0
|
||||||
|
hsluv.refU = 0.19783000664283
|
||||||
|
hsluv.refV = 0.46831999493879
|
||||||
|
hsluv.kappa = 903.2962962
|
||||||
|
hsluv.epsilon = 0.0088564516
|
||||||
|
|
||||||
|
return hsluv
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.apply(flavour)
|
||||||
|
flavour = flavour or require("catppuccin").flavour
|
||||||
|
|
||||||
|
local _O, _C, _U = O, C, U -- Borrowing global var (setfenv doesn't work with require)
|
||||||
|
O = require("catppuccin").options
|
||||||
|
C = require("catppuccin.palettes").get_palette(flavour)
|
||||||
|
U = require "catppuccin.utils.colors"
|
||||||
|
|
||||||
|
C.none = "NONE"
|
||||||
|
|
||||||
|
local dim_percentage = O.dim_inactive.percentage
|
||||||
|
C.dim = O.dim_inactive.shade == "dark"
|
||||||
|
and U.vary_color(
|
||||||
|
{ latte = U.darken(C.base, dim_percentage, C.mantle) },
|
||||||
|
U.darken(C.base, dim_percentage, C.mantle)
|
||||||
|
)
|
||||||
|
or U.vary_color(
|
||||||
|
{ latte = U.lighten("#FBFCFD", dim_percentage, C.base) },
|
||||||
|
U.lighten(C.surface0, dim_percentage, C.base)
|
||||||
|
)
|
||||||
|
|
||||||
|
local theme = {}
|
||||||
|
theme.syntax = require("catppuccin.groups.syntax").get()
|
||||||
|
theme.editor = require("catppuccin.groups.editor").get()
|
||||||
|
local final_integrations = {}
|
||||||
|
|
||||||
|
-- https://github.com/catppuccin/nvim/pull/624
|
||||||
|
if type(O.integrations.dap) == "table" and O.integrations.dap.enable_ui ~= nil then
|
||||||
|
O.integrations.dap_ui = O.integrations.dap.enable_ui
|
||||||
|
O.integrations.dap.enable_ui = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
for integration in pairs(O.integrations) do
|
||||||
|
local cot = false
|
||||||
|
if type(O.integrations[integration]) == "table" then
|
||||||
|
if O.integrations[integration].enabled == true then cot = true end
|
||||||
|
else
|
||||||
|
if O.integrations[integration] == true then
|
||||||
|
local default = require("catppuccin").default_options.integrations[integration]
|
||||||
|
O.integrations[integration] = type(default) == "table" and default or {}
|
||||||
|
O.integrations[integration].enabled = true
|
||||||
|
cot = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if cot then
|
||||||
|
final_integrations = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
final_integrations,
|
||||||
|
require("catppuccin.groups.integrations." .. integration).get()
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
theme.integrations = final_integrations -- plugins
|
||||||
|
theme.terminal = require("catppuccin.groups.terminal").get() -- terminal colors
|
||||||
|
local user_highlights = O.highlight_overrides
|
||||||
|
if type(user_highlights[flavour]) == "function" then user_highlights[flavour] = user_highlights[flavour](C) end
|
||||||
|
theme.custom_highlights = vim.tbl_deep_extend(
|
||||||
|
"keep",
|
||||||
|
user_highlights[flavour] or {},
|
||||||
|
type(user_highlights.all) == "function" and user_highlights.all(C) or user_highlights.all or {}
|
||||||
|
)
|
||||||
|
|
||||||
|
O, C, U = _O, _C, _U -- Returning global var
|
||||||
|
|
||||||
|
return theme
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
-- Reference(stripped down): https://github.com/davidm/lua-bit-numberlua/blob/master/lmod/bit/numberlua.lua
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local floor = math.floor
|
||||||
|
|
||||||
|
local MOD = 2 ^ 32
|
||||||
|
|
||||||
|
local function memoize(f)
|
||||||
|
local mt = {}
|
||||||
|
local t = setmetatable({}, mt)
|
||||||
|
function mt:__index(k)
|
||||||
|
local v = f(k)
|
||||||
|
t[k] = v
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
|
||||||
|
local function make_bitop_uncached(t, m)
|
||||||
|
local function bitop(a, b)
|
||||||
|
local res, p = 0, 1
|
||||||
|
while a ~= 0 and b ~= 0 do
|
||||||
|
local am, bm = a % m, b % m
|
||||||
|
res = res + t[am][bm] * p
|
||||||
|
a = (a - am) / m
|
||||||
|
b = (b - bm) / m
|
||||||
|
p = p * m
|
||||||
|
end
|
||||||
|
res = res + (a + b) * p
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
|
return bitop
|
||||||
|
end
|
||||||
|
|
||||||
|
local function make_bitop(t)
|
||||||
|
local op1 = make_bitop_uncached(t, 2 ^ 1)
|
||||||
|
local op2 = memoize(function(a)
|
||||||
|
return memoize(function(b) return op1(a, b) end)
|
||||||
|
end)
|
||||||
|
return make_bitop_uncached(op2, 2 ^ (t.n or 1))
|
||||||
|
end
|
||||||
|
|
||||||
|
M.bxor = make_bitop { [0] = { [0] = 0, [1] = 1 }, [1] = { [0] = 1, [1] = 0 }, n = 4 }
|
||||||
|
local bxor = M.bxor
|
||||||
|
|
||||||
|
local lshift, rshift
|
||||||
|
|
||||||
|
lshift = function(a, disp) -- Lua5.2 inspired
|
||||||
|
if disp < 0 then return rshift(a, -disp) end
|
||||||
|
return (a * 2 ^ disp) % 2 ^ 32
|
||||||
|
end
|
||||||
|
|
||||||
|
rshift = function(a, disp) -- Lua5.2 inspired
|
||||||
|
if disp < 0 then return lshift(a, -disp) end
|
||||||
|
return floor(a % 2 ^ 32 / 2 ^ disp)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function bit_tobit(x)
|
||||||
|
x = x % MOD
|
||||||
|
if x >= 0x80000000 then x = x - MOD end
|
||||||
|
return x
|
||||||
|
end
|
||||||
|
|
||||||
|
local function bit_bxor(a, b, c, ...)
|
||||||
|
if c then
|
||||||
|
return bit_bxor(bit_bxor(a, b), c, ...)
|
||||||
|
elseif b then
|
||||||
|
return bit_tobit(bxor(a % MOD, b % MOD))
|
||||||
|
else
|
||||||
|
return bit_tobit(a)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
bxor = bit_bxor,
|
||||||
|
lshift = function(x, n) return bit_tobit(lshift(x % MOD, n % 32)) end,
|
||||||
|
}
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
local path_sep = require("catppuccin").path_sep
|
||||||
|
local O = require("catppuccin").options
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- Reference: https://github.com/EdenEast/nightfox.nvim
|
||||||
|
local fmt = string.format
|
||||||
|
|
||||||
|
function M.compile(flavour)
|
||||||
|
local theme = require("catppuccin.lib.mapper").apply(flavour)
|
||||||
|
local lines = {
|
||||||
|
string.format(
|
||||||
|
[=[
|
||||||
|
return string.dump(function()
|
||||||
|
vim.command[[
|
||||||
|
if exists("colors_name")
|
||||||
|
hi clear
|
||||||
|
endif
|
||||||
|
set termguicolors
|
||||||
|
set background=%s
|
||||||
|
let g:colors_name = "catppuccin-%s"]=],
|
||||||
|
(flavour == "latte" and "light" or "dark"),
|
||||||
|
flavour
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
local tbl = vim.tbl_deep_extend("keep", theme.custom_highlights, theme.integrations, theme.syntax, theme.editor)
|
||||||
|
|
||||||
|
if O.term_colors == true then
|
||||||
|
for k, v in pairs(theme.terminal) do
|
||||||
|
table.insert(lines, fmt("let g:%s = '%s'", k, v))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for group, color in pairs(tbl) do
|
||||||
|
if color.link and (theme.custom_highlights[group] and not theme.custom_highlights[group].link) then
|
||||||
|
color.link = nil
|
||||||
|
end
|
||||||
|
if color.link then
|
||||||
|
table.insert(lines, fmt([[highlight! link %s %s]], group, color.link))
|
||||||
|
else
|
||||||
|
if color.style then
|
||||||
|
local rstyle = {}
|
||||||
|
for _, style in pairs(color.style) do
|
||||||
|
if O.no_italic and style == "italic" then style = nil end
|
||||||
|
if O.no_bold and style == "bold" then style = nil end
|
||||||
|
if O.no_underline and style == "underline" then style = nil end
|
||||||
|
if style then rstyle[#rstyle + 1] = style end
|
||||||
|
end
|
||||||
|
color.style = table.concat(rstyle, ",")
|
||||||
|
end
|
||||||
|
if color.style == "" then color.style = nil end
|
||||||
|
table.insert(
|
||||||
|
lines,
|
||||||
|
fmt(
|
||||||
|
[[highlight %s guifg=%s guibg=%s gui=%s guisp=%s]],
|
||||||
|
group,
|
||||||
|
color.fg or "NONE",
|
||||||
|
color.bg or "NONE",
|
||||||
|
color.style or "NONE",
|
||||||
|
color.sp or "NONE"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(lines, "]]end, true)")
|
||||||
|
if vim.fn.isdirectory(O.compile_path) == 0 then vim.fn.mkdir(O.compile_path, "p") end
|
||||||
|
local ls = loadstring or load
|
||||||
|
|
||||||
|
if vim.g.catppuccin_debug then -- Debugging purpose
|
||||||
|
local deb = io.open(O.compile_path .. path_sep .. flavour .. ".lua", "wb")
|
||||||
|
if deb then
|
||||||
|
deb:write(table.concat(lines, "\n"))
|
||||||
|
deb:close()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local f = ls(table.concat(lines, "\n"))
|
||||||
|
if not f then
|
||||||
|
local err_path = (path_sep == "/" and "/tmp" or os.getenv "TMP") .. "/catppuccin_error.lua"
|
||||||
|
print(string.format(
|
||||||
|
[[Catppuccin (error): Most likely some mistake made in your catppuccin config
|
||||||
|
You can open %s for debugging
|
||||||
|
|
||||||
|
If you think this is a bug, kindly open an issue and attach %s file
|
||||||
|
Below is the error message that we captured:
|
||||||
|
]],
|
||||||
|
err_path,
|
||||||
|
err_path
|
||||||
|
))
|
||||||
|
local err = io.open(err_path, "wb")
|
||||||
|
if err then
|
||||||
|
err:write(table.concat(lines, "\n"))
|
||||||
|
err:close()
|
||||||
|
end
|
||||||
|
dofile(err_path)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local file = assert(
|
||||||
|
io.open(O.compile_path .. path_sep .. flavour, "wb"),
|
||||||
|
"Permission denied while writing compiled file to " .. O.compile_path .. path_sep .. flavour
|
||||||
|
)
|
||||||
|
file:write(f())
|
||||||
|
file:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
-- TODO: private _G.vim
|
||||||
|
vim.command [[command! CatppuccinCompile lua require('catppuccin').compile() print("Catppuccin (info): compiled cache!")]]
|
||||||
|
|
||||||
|
vim.o = setmetatable({}, {
|
||||||
|
__index = function(_, k)
|
||||||
|
if k == "background" then return vim.eval "&background" end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.fn.stdpath = function(what)
|
||||||
|
if what ~= "cache" then return end
|
||||||
|
if package.config:sub(1, 1) == "\\" then
|
||||||
|
return vim.fn.expand "%localappdata%" .. [[Temp\vim]]
|
||||||
|
else
|
||||||
|
return (os.getenv "XDG_CACHE_HOME" or vim.fn.expand "$HOME/.cache") .. "/vim"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.env = setmetatable({}, {
|
||||||
|
__index = function(_, k) return os.getenv(k) end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Reference: https://github.com/neovim/neovim/blob/master/runtime/lua/vim/shared.lua
|
||||||
|
local function tbl_isempty(t)
|
||||||
|
assert(type(t) == "table", string.format("Expected table, got %s", type(t)))
|
||||||
|
return next(t) == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function tbl_islist(t)
|
||||||
|
if type(t) ~= "table" then return false end
|
||||||
|
|
||||||
|
local count = 0
|
||||||
|
|
||||||
|
for k, _ in pairs(t) do
|
||||||
|
if type(k) == "number" then
|
||||||
|
count = count + 1
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if count > 0 then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
-- TODO(bfredl): in the future, we will always be inside nvim
|
||||||
|
-- then this check can be deleted.
|
||||||
|
if vim._empty_dict_mt == nil then return false end
|
||||||
|
return getmetatable(t) ~= vim._empty_dict_mt
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function can_merge(v) return type(v) == "table" and (tbl_isempty(v) or not tbl_islist(v)) end
|
||||||
|
|
||||||
|
local function tbl_extend(behavior, deep_extend, ...)
|
||||||
|
if behavior ~= "error" and behavior ~= "keep" and behavior ~= "force" then
|
||||||
|
error('invalid "behavior": ' .. tostring(behavior))
|
||||||
|
end
|
||||||
|
|
||||||
|
if select("#", ...) < 2 then
|
||||||
|
error("wrong number of arguments (given " .. tostring(1 + select("#", ...)) .. ", expected at least 3)")
|
||||||
|
end
|
||||||
|
|
||||||
|
local ret = {}
|
||||||
|
if vim._empty_dict_mt ~= nil and getmetatable(select(1, ...)) == vim._empty_dict_mt then ret = vim.empty_dict() end
|
||||||
|
|
||||||
|
for i = 1, select("#", ...) do
|
||||||
|
local tbl = select(i, ...)
|
||||||
|
if tbl then
|
||||||
|
for k, v in pairs(tbl) do
|
||||||
|
if deep_extend and can_merge(v) and can_merge(ret[k]) then
|
||||||
|
ret[k] = tbl_extend(behavior, true, ret[k], v)
|
||||||
|
elseif behavior ~= "force" and ret[k] ~= nil then
|
||||||
|
if behavior == "error" then error("key found in more than one map: " .. k) end -- Else behavior is "keep".
|
||||||
|
else
|
||||||
|
ret[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
function vim.tbl_deep_extend(behavior, ...) return tbl_extend(behavior, true, ...) end
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
rosewater = "#f2d5cf",
|
||||||
|
flamingo = "#eebebe",
|
||||||
|
pink = "#f4b8e4",
|
||||||
|
mauve = "#ca9ee6",
|
||||||
|
red = "#e78284",
|
||||||
|
maroon = "#ea999c",
|
||||||
|
peach = "#ef9f76",
|
||||||
|
yellow = "#e5c890",
|
||||||
|
green = "#a6d189",
|
||||||
|
teal = "#81c8be",
|
||||||
|
sky = "#99d1db",
|
||||||
|
sapphire = "#85c1dc",
|
||||||
|
blue = "#8caaee",
|
||||||
|
lavender = "#babbf1",
|
||||||
|
text = "#c6d0f5",
|
||||||
|
subtext1 = "#b5bfe2",
|
||||||
|
subtext0 = "#a5adce",
|
||||||
|
overlay2 = "#949cbb",
|
||||||
|
overlay1 = "#838ba7",
|
||||||
|
overlay0 = "#737994",
|
||||||
|
surface2 = "#626880",
|
||||||
|
surface1 = "#51576d",
|
||||||
|
surface0 = "#414559",
|
||||||
|
base = "#303446",
|
||||||
|
mantle = "#292c3c",
|
||||||
|
crust = "#232634",
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get_palette(flavour)
|
||||||
|
local flvr = flavour or require("catppuccin").flavour or vim.g.catppuccin_flavour or "mocha"
|
||||||
|
local _, palette = pcall(require, "catppuccin.palettes." .. flvr)
|
||||||
|
local O = require("catppuccin").options
|
||||||
|
local ans = vim.tbl_deep_extend("keep", O.color_overrides.all or {}, O.color_overrides[flvr] or {}, palette or {})
|
||||||
|
if O.kitty then -- https://github.com/kovidgoyal/kitty/issues/2917
|
||||||
|
for accent, hex in pairs(ans) do
|
||||||
|
local red_green_string = hex:sub(1, 5)
|
||||||
|
local blue_value = tonumber(hex:sub(6, 7), 16)
|
||||||
|
|
||||||
|
-- Slightly increase or decrease brightness of the blue channel
|
||||||
|
blue_value = blue_value == 255 and blue_value - 1 or blue_value + 1
|
||||||
|
ans[accent] = string.format("%s%.2x", red_green_string, blue_value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ans
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
rosewater = "#dc8a78",
|
||||||
|
flamingo = "#dd7878",
|
||||||
|
pink = "#ea76cb",
|
||||||
|
mauve = "#8839ef",
|
||||||
|
red = "#d20f39",
|
||||||
|
maroon = "#e64553",
|
||||||
|
peach = "#fe640b",
|
||||||
|
yellow = "#df8e1d",
|
||||||
|
green = "#40a02b",
|
||||||
|
teal = "#179299",
|
||||||
|
sky = "#04a5e5",
|
||||||
|
sapphire = "#209fb5",
|
||||||
|
blue = "#1e66f5",
|
||||||
|
lavender = "#7287fd",
|
||||||
|
text = "#4c4f69",
|
||||||
|
subtext1 = "#5c5f77",
|
||||||
|
subtext0 = "#6c6f85",
|
||||||
|
overlay2 = "#7c7f93",
|
||||||
|
overlay1 = "#8c8fa1",
|
||||||
|
overlay0 = "#9ca0b0",
|
||||||
|
surface2 = "#acb0be",
|
||||||
|
surface1 = "#bcc0cc",
|
||||||
|
surface0 = "#ccd0da",
|
||||||
|
base = "#eff1f5",
|
||||||
|
mantle = "#e6e9ef",
|
||||||
|
crust = "#dce0e8",
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
rosewater = "#f4dbd6",
|
||||||
|
flamingo = "#f0c6c6",
|
||||||
|
pink = "#f5bde6",
|
||||||
|
mauve = "#c6a0f6",
|
||||||
|
red = "#ed8796",
|
||||||
|
maroon = "#ee99a0",
|
||||||
|
peach = "#f5a97f",
|
||||||
|
yellow = "#eed49f",
|
||||||
|
green = "#a6da95",
|
||||||
|
teal = "#8bd5ca",
|
||||||
|
sky = "#91d7e3",
|
||||||
|
sapphire = "#7dc4e4",
|
||||||
|
blue = "#8aadf4",
|
||||||
|
lavender = "#b7bdf8",
|
||||||
|
text = "#cad3f5",
|
||||||
|
subtext1 = "#b8c0e0",
|
||||||
|
subtext0 = "#a5adcb",
|
||||||
|
overlay2 = "#939ab7",
|
||||||
|
overlay1 = "#8087a2",
|
||||||
|
overlay0 = "#6e738d",
|
||||||
|
surface2 = "#5b6078",
|
||||||
|
surface1 = "#494d64",
|
||||||
|
surface0 = "#363a4f",
|
||||||
|
base = "#24273a",
|
||||||
|
mantle = "#1e2030",
|
||||||
|
crust = "#181926",
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
rosewater = "#f5e0dc",
|
||||||
|
flamingo = "#f2cdcd",
|
||||||
|
pink = "#f5c2e7",
|
||||||
|
mauve = "#cba6f7",
|
||||||
|
red = "#f38ba8",
|
||||||
|
maroon = "#eba0ac",
|
||||||
|
peach = "#fab387",
|
||||||
|
yellow = "#f9e2af",
|
||||||
|
green = "#a6e3a1",
|
||||||
|
teal = "#94e2d5",
|
||||||
|
sky = "#89dceb",
|
||||||
|
sapphire = "#74c7ec",
|
||||||
|
blue = "#89b4fa",
|
||||||
|
lavender = "#b4befe",
|
||||||
|
text = "#cdd6f4",
|
||||||
|
subtext1 = "#bac2de",
|
||||||
|
subtext0 = "#a6adc8",
|
||||||
|
overlay2 = "#9399b2",
|
||||||
|
overlay1 = "#7f849c",
|
||||||
|
overlay0 = "#6c7086",
|
||||||
|
surface2 = "#585b70",
|
||||||
|
surface1 = "#45475a",
|
||||||
|
surface0 = "#313244",
|
||||||
|
base = "#1e1e2e",
|
||||||
|
mantle = "#181825",
|
||||||
|
crust = "#11111b",
|
||||||
|
}
|
||||||
@ -0,0 +1,278 @@
|
|||||||
|
---@class Catppuccin
|
||||||
|
---@field options CatppuccinOptions
|
||||||
|
---@field setup fun(opts: CatppuccinOptions?)
|
||||||
|
|
||||||
|
---@alias CtpFlavor "mocha" | "macchiato" | "frappe" | "latte" | "auto"
|
||||||
|
---@alias CtpColor "rosewater" | "flamingo" | "pink" | "mauve" | "red" | "maroon" | "peach" | "yellow" | "green" | "teal" | "sky" | "sapphire" | "blue" | "lavender" | "text" | "subtext1" | "subtext0" | "overlay2" | "overlay1" | "overlay0" | "surface2" | "surface1" | "surface0" | "base" | "mantle" | "crust"
|
||||||
|
---@class CtpFlavors<T>: {all: T, mocha: T, macchiato: T, frappe: T, latte: T }
|
||||||
|
---@class CtpColors<T>: {rosewater: T, flamingo: T, pink: T, mauve: T, red: T, maroon: T, peach: T, yellow: T, green: T, teal: T, sky: T, sapphire: T, blue: T, lavender: T, text: T, subtext1: T, subtext0: T, overlay2: T, overlay1: T, overlay0: T, surface2: T, surface1: T, surface0: T, base: T, mantle: T, crust: T, none: T }
|
||||||
|
|
||||||
|
---@class CatppuccinOptions
|
||||||
|
-- Changes the flavor based on the background. See `:h background` for more info.
|
||||||
|
---@field background CtpBackground?
|
||||||
|
-- By default catppuccin writes the compiled results into the system's cache directory.
|
||||||
|
-- You can change the cache dir by changing this value.
|
||||||
|
---@field compile_path string?
|
||||||
|
-- Whether to enable transparency.
|
||||||
|
---@field transparent_background boolean?
|
||||||
|
-- Toggle the `~` characters after the end of buffers.
|
||||||
|
---@field show_end_of_buffer boolean?
|
||||||
|
-- If true, sets terminal colors (e.g. `g:terminal_color_0`).
|
||||||
|
---@field term_colors boolean?
|
||||||
|
-- Workaround for kitty transparency issue: https://github.com/kovidgoyal/kitty/issues/2917
|
||||||
|
---@field kitty boolean?
|
||||||
|
-- Settings for dimming of inactive windows.
|
||||||
|
---@field dim_inactive CtpDimInactive?
|
||||||
|
-- Disables all italic styles.
|
||||||
|
---@field no_italic boolean?
|
||||||
|
-- Disables all bold styles.
|
||||||
|
---@field no_bold boolean?
|
||||||
|
-- Disables all underline styles.
|
||||||
|
---@field no_underline boolean?
|
||||||
|
-- Handles the style of general hl groups (see `:h highlight-groups`).
|
||||||
|
---@field styles CtpStyles?
|
||||||
|
-- Should default integrations be used.
|
||||||
|
---@field default_integrations boolean?
|
||||||
|
-- Toggle integrations. Integrations allow Catppuccin to set the theme of various plugins.
|
||||||
|
---@field integrations CtpIntegrations?
|
||||||
|
-- Catppuccin colors can be overwritten here.
|
||||||
|
---@field color_overrides CtpColors | CtpFlavors<CtpColors<string>> | nil
|
||||||
|
-- Catppuccin highlights can be overwritten here.
|
||||||
|
---@field highlight_overrides CtpHighlightOverrides?
|
||||||
|
-- Global highlight overrides.
|
||||||
|
---@field custom_highlights CtpHighlightOverrideFn | {[string]: CtpHighlight} | nil
|
||||||
|
-- The default flavor to use on startup.
|
||||||
|
---@field flavour CtpFlavor?
|
||||||
|
|
||||||
|
---@class CtpBackground
|
||||||
|
-- Catppuccin flavor to use when `:set background=dark` is set.
|
||||||
|
---@field dark CtpFlavor?
|
||||||
|
-- Catppuccin flavor to use when `:set background=light` is set.
|
||||||
|
---@field light CtpFlavor?
|
||||||
|
|
||||||
|
---@class CtpDimInactive
|
||||||
|
-- Whether to dim inactive windows.
|
||||||
|
---@field enabled boolean
|
||||||
|
-- Whether to darken or lighten inactive windows.
|
||||||
|
---@field shade "dark" | "light" | nil
|
||||||
|
-- Percentage of the shade to apply to the inactive window
|
||||||
|
---@field percentage number?
|
||||||
|
|
||||||
|
---@class CtpStyles
|
||||||
|
-- Change the style of comments.
|
||||||
|
---@field comments CtpHighlightArgs[]?
|
||||||
|
-- Change the style of conditionals.
|
||||||
|
---@field conditionals CtpHighlightArgs[]?
|
||||||
|
-- Change the style of loops.
|
||||||
|
---@field loops CtpHighlightArgs[]?
|
||||||
|
-- Change the style of functions.
|
||||||
|
---@field functions CtpHighlightArgs[]?
|
||||||
|
-- Change the style of keywords.
|
||||||
|
---@field keywords CtpHighlightArgs[]?
|
||||||
|
-- Change the style of strings.
|
||||||
|
---@field strings CtpHighlightArgs[]?
|
||||||
|
-- Change the style of variables.
|
||||||
|
---@field variables CtpHighlightArgs[]?
|
||||||
|
-- Change the style of numbers.
|
||||||
|
---@field numbers CtpHighlightArgs[]?
|
||||||
|
-- Change the style of booleans.
|
||||||
|
---@field booleans CtpHighlightArgs[]?
|
||||||
|
-- Change the style of properties.
|
||||||
|
---@field properties CtpHighlightArgs[]?
|
||||||
|
-- Change the style of types.
|
||||||
|
---@field types CtpHighlightArgs[]?
|
||||||
|
-- Change the style of operators.
|
||||||
|
---@field operators CtpHighlightArgs[]?
|
||||||
|
-- Change the style of miscs.
|
||||||
|
---@field miscs CtpHighlightArgs[]?
|
||||||
|
|
||||||
|
---@class CtpNativeLspStyles
|
||||||
|
-- Change the style of LSP errors.
|
||||||
|
---@field errors CtpHighlightArgs[]?
|
||||||
|
-- Change the style of LSP hints.
|
||||||
|
---@field hints CtpHighlightArgs[]?
|
||||||
|
-- Change the style of LSP warnings.
|
||||||
|
---@field warnings CtpHighlightArgs[]?
|
||||||
|
-- Change the style of LSP information.
|
||||||
|
---@field information CtpHighlightArgs[]?
|
||||||
|
|
||||||
|
---@class CtpNativeLspInlayHints
|
||||||
|
-- Toggle the background of inlay hints.
|
||||||
|
---@field background boolean?
|
||||||
|
|
||||||
|
---@class CtpIntegrations
|
||||||
|
---@field aerial boolean?
|
||||||
|
---@field alpha boolean?
|
||||||
|
---@field barbar boolean?
|
||||||
|
-- Use this to set it up:
|
||||||
|
--
|
||||||
|
-- ```lua
|
||||||
|
-- require("barbecue").setup {
|
||||||
|
-- -- valid options:
|
||||||
|
-- -- "catppuccin-latte"
|
||||||
|
-- -- "catppuccin-frappe"
|
||||||
|
-- -- "catppuccin-macchiato"
|
||||||
|
-- -- "catppuccin-mocha"
|
||||||
|
-- theme = "catppuccin",
|
||||||
|
-- }
|
||||||
|
---```
|
||||||
|
---@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.
|
||||||
|
---@field coc_nvim boolean?
|
||||||
|
-- ```lua
|
||||||
|
-- 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 = ""})
|
||||||
|
-- ```
|
||||||
|
---@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:
|
||||||
|
--
|
||||||
|
-- ```lua
|
||||||
|
-- require("fidget").setup {
|
||||||
|
-- notification = {
|
||||||
|
-- window = { winblend = 0 },
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- ```
|
||||||
|
---@field fidget boolean?
|
||||||
|
---@field flash boolean?
|
||||||
|
---@field gitgutter boolean?
|
||||||
|
---@field gitsigns boolean?
|
||||||
|
---@field harpoon boolean?
|
||||||
|
---@field headlines boolean?
|
||||||
|
---@field hop boolean?
|
||||||
|
---@field illuminate CtpIntegrationIlluminate | boolean?
|
||||||
|
---@field indent_blankline CtpIntegrationIndentBlankline | boolean?
|
||||||
|
---@field leap boolean?
|
||||||
|
---@field lightspeed boolean?
|
||||||
|
-- For custom Lsp kind icon and colors, adjust your `lspsaga` config:
|
||||||
|
--
|
||||||
|
-- ```lua
|
||||||
|
-- require("lspsaga").setup {
|
||||||
|
-- ui = {
|
||||||
|
-- kind = require("catppuccin.groups.integrations.lsp_saga").custom_kind(),
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- ```
|
||||||
|
---@field lsp_saga boolean?
|
||||||
|
---@field lsp_trouble boolean?
|
||||||
|
---@field markdown boolean?
|
||||||
|
---@field mason boolean?
|
||||||
|
---@field native_lsp CtpIntegrationNativeLsp | boolean?
|
||||||
|
-- You **NEED** to enable highlight in your `nvim-navic` config or it won't work:
|
||||||
|
--
|
||||||
|
-- ```lua
|
||||||
|
-- require("nvim-navic").setup {
|
||||||
|
-- highlight = true
|
||||||
|
-- }
|
||||||
|
-- ```
|
||||||
|
---@field navic CtpIntegrationNavic | boolean?
|
||||||
|
---@field neogit boolean?
|
||||||
|
---@field neotest boolean?
|
||||||
|
---@field neotree boolean?
|
||||||
|
---@field noice boolean?
|
||||||
|
---@field notify boolean?
|
||||||
|
---@field nvimtree boolean?
|
||||||
|
---@field octo boolean?
|
||||||
|
---@field overseer boolean?
|
||||||
|
---@field pounce boolean?
|
||||||
|
---@field rainbow_delimiters boolean?
|
||||||
|
---@field sandwich boolean?
|
||||||
|
---@field semantic_tokens boolean?
|
||||||
|
---@field symbols_outline boolean?
|
||||||
|
---@field telekasten boolean?
|
||||||
|
---@field telescope CtpIntegrationTelescope | boolean?
|
||||||
|
---@field treesitter boolean?
|
||||||
|
---@field treesitter_context boolean?
|
||||||
|
---@field ts_rainbow boolean?
|
||||||
|
---@field ts_rainbow2 boolean?
|
||||||
|
---@field vim_sneak boolean?
|
||||||
|
---@field vimwiki boolean?
|
||||||
|
---@field which_key boolean?
|
||||||
|
---@field window_picker boolean?
|
||||||
|
|
||||||
|
---@class CtpIntegrationBarbecue
|
||||||
|
-- Whether to use the alternative background.
|
||||||
|
---@field alt_background boolean?
|
||||||
|
-- Whether the basename should be bold.
|
||||||
|
---@field bold_basename boolean?
|
||||||
|
-- Whether the context should be dimmed.
|
||||||
|
---@field dim_context boolean?
|
||||||
|
-- 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
|
||||||
|
-- Set to true to apply color to the text in dropbar, false to only apply it to the icons.
|
||||||
|
---@field color_mode boolean?
|
||||||
|
|
||||||
|
---@class CtpIntegrationIndentBlankline
|
||||||
|
-- Whether to enable the integration.
|
||||||
|
---@field enabled boolean
|
||||||
|
-- Sets the color of the scope line
|
||||||
|
---@field scope_color CtpColor?
|
||||||
|
-- Enables char highlights per indent level.
|
||||||
|
-- Follow the instructions on the plugins GitHub repo to set it up.
|
||||||
|
---@field colored_indent_levels boolean?
|
||||||
|
|
||||||
|
---@class CtpIntegrationMini
|
||||||
|
-- Whether to enable the integration.
|
||||||
|
---@field enabled boolean
|
||||||
|
-- Sets the color of the scope line
|
||||||
|
---@field indentscope_color CtpColor?
|
||||||
|
|
||||||
|
---@class CtpIntegrationNativeLsp
|
||||||
|
-- Whether to enable the Native LSP integration.
|
||||||
|
---@field enabled boolean
|
||||||
|
-- Styles to apply to virtual text.
|
||||||
|
---@field virtual_text CtpNativeLspStyles?
|
||||||
|
-- Styles to apply to underlines.
|
||||||
|
---@field underlines CtpNativeLspStyles?
|
||||||
|
-- Inlay hints options.
|
||||||
|
---@field inlay_hints CtpNativeLspInlayHints?
|
||||||
|
|
||||||
|
---@class CtpIntegrationNavic
|
||||||
|
-- Whether to enable the navic integration.
|
||||||
|
---@field enabled boolean
|
||||||
|
-- Override the background color for navic.
|
||||||
|
---@field custom_bg CtpColor | "NONE" | "lualine" | nil
|
||||||
|
|
||||||
|
---@class CtpIntegrationTelescope
|
||||||
|
-- Whether to enable the telescope integration
|
||||||
|
---@field enabled boolean?
|
||||||
|
-- The style of Telescope
|
||||||
|
---@field style "classic" | "nvchad" | nil
|
||||||
|
|
||||||
|
---@class CtpIntegrationIlluminate
|
||||||
|
-- Whether to enable the vim-illuminate integration
|
||||||
|
---@field enabled boolean?
|
||||||
|
-- Whether to standout IlluminatedWordWrite hl group
|
||||||
|
---@field lsp boolean?
|
||||||
|
|
||||||
|
---@alias CtpHighlightArgs "bold" | "underline" | "undercurl" | "underdouble" | "underdotted" | "underdashed" | "strikethrough" | "reverse" | "inverse" | "italic" | "standout" | "altfont" | "nocombine" | "NONE"
|
||||||
|
---@alias CtpHighlightOverrideFn fun(colors: CtpColors<string>): { [string]: CtpHighlight}
|
||||||
|
---@alias CtpHighlightOverrides CtpFlavors<CtpHighlightOverrideFn>
|
||||||
|
|
||||||
|
---@class CtpHighlight
|
||||||
|
---@field fg string?
|
||||||
|
---@field bg string?
|
||||||
|
---@field style CtpHighlightArgs[]?
|
||||||
|
---@field link string?
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
return function(flavour)
|
||||||
|
local C = require("catppuccin.palettes").get_palette(flavour)
|
||||||
|
local O = require("catppuccin").options
|
||||||
|
|
||||||
|
local transparent_bg = O.transparent_background and C.none or C.mantle
|
||||||
|
|
||||||
|
local dirname_color = O.integrations.barbecue.dim_dirname and C.overlay1 or C.text
|
||||||
|
local basename_bold = O.integrations.barbecue.bold_basename
|
||||||
|
local context_color = O.integrations.barbecue.dim_context and C.overlay1 or C.text
|
||||||
|
local background_color = O.integrations.barbecue.alt_background and transparent_bg or C.none
|
||||||
|
|
||||||
|
local M = {
|
||||||
|
normal = { fg = C.text, bg = background_color },
|
||||||
|
|
||||||
|
ellipsis = { fg = C.overlay1 },
|
||||||
|
separator = { fg = C.overlay1 },
|
||||||
|
modified = { fg = C.peach },
|
||||||
|
|
||||||
|
dirname = { fg = dirname_color },
|
||||||
|
basename = { fg = C.text, bold = basename_bold },
|
||||||
|
context = { fg = context_color },
|
||||||
|
|
||||||
|
-- Same keys as navic
|
||||||
|
context_file = { fg = C.blue },
|
||||||
|
context_module = { fg = C.blue },
|
||||||
|
context_namespace = { fg = C.blue },
|
||||||
|
context_package = { fg = C.blue },
|
||||||
|
context_class = { fg = C.yellow },
|
||||||
|
context_method = { fg = C.blue },
|
||||||
|
context_property = { fg = C.green },
|
||||||
|
context_field = { fg = C.green },
|
||||||
|
context_constructor = { fg = C.blue },
|
||||||
|
context_enum = { fg = C.green },
|
||||||
|
context_interface = { fg = C.yellow },
|
||||||
|
context_function = { fg = C.blue },
|
||||||
|
context_variable = { fg = C.flamingo },
|
||||||
|
context_constant = { fg = C.peach },
|
||||||
|
context_string = { fg = C.green },
|
||||||
|
context_number = { fg = C.peach },
|
||||||
|
context_boolean = { fg = C.peach },
|
||||||
|
context_array = { fg = C.blue },
|
||||||
|
context_object = { fg = C.blue },
|
||||||
|
context_key = { fg = C.flamingo },
|
||||||
|
context_null = { fg = C.peach },
|
||||||
|
context_enum_member = { fg = C.red },
|
||||||
|
context_struct = { fg = C.blue },
|
||||||
|
context_event = { fg = C.blue },
|
||||||
|
context_operator = { fg = C.blue },
|
||||||
|
context_type_parameter = { fg = C.blue },
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
|
end
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local hsluv = require "catppuccin.lib.hsluv"
|
||||||
|
|
||||||
|
M.bg = "#000000"
|
||||||
|
M.fg = "#ffffff"
|
||||||
|
M.day_brightness = 0.3
|
||||||
|
|
||||||
|
---@param hex_str string hexadecimal value of a color
|
||||||
|
local hex_to_rgb = function(hex_str)
|
||||||
|
local hex = "[abcdef0-9][abcdef0-9]"
|
||||||
|
local pat = "^#(" .. hex .. ")(" .. hex .. ")(" .. hex .. ")$"
|
||||||
|
hex_str = string.lower(hex_str)
|
||||||
|
|
||||||
|
assert(string.find(hex_str, pat) ~= nil, "hex_to_rgb: invalid hex_str: " .. tostring(hex_str))
|
||||||
|
|
||||||
|
local red, green, blue = string.match(hex_str, pat)
|
||||||
|
return { tonumber(red, 16), tonumber(green, 16), tonumber(blue, 16) }
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param fg string forecrust color
|
||||||
|
---@param bg string background color
|
||||||
|
---@param alpha number number between 0 and 1. 0 results in bg, 1 results in fg
|
||||||
|
function M.blend(fg, bg, alpha)
|
||||||
|
bg = hex_to_rgb(bg)
|
||||||
|
fg = hex_to_rgb(fg)
|
||||||
|
|
||||||
|
local blendChannel = function(i)
|
||||||
|
local ret = (alpha * fg[i] + ((1 - alpha) * bg[i]))
|
||||||
|
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
|
||||||
|
end
|
||||||
|
|
||||||
|
return string.format("#%02X%02X%02X", blendChannel(1), blendChannel(2), blendChannel(3))
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.darken(hex, amount, bg) return M.blend(hex, bg or M.bg, math.abs(amount)) end
|
||||||
|
|
||||||
|
function M.lighten(hex, amount, fg) return M.blend(hex, fg or M.fg, math.abs(amount)) end
|
||||||
|
|
||||||
|
function M.brighten(color, percentage)
|
||||||
|
local hsl = hsluv.hex_to_hsluv(color)
|
||||||
|
local larpSpace = 100 - hsl[3]
|
||||||
|
if percentage < 0 then larpSpace = hsl[3] end
|
||||||
|
hsl[3] = hsl[3] + larpSpace * percentage
|
||||||
|
return hsluv.hsluv_to_hex(hsl)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.invertColor(color)
|
||||||
|
if color ~= "NONE" then
|
||||||
|
local hsl = hsluv.hex_to_hsluv(color)
|
||||||
|
hsl[3] = 100 - hsl[3]
|
||||||
|
if hsl[3] < 40 then hsl[3] = hsl[3] + (100 - hsl[3]) * M.day_brightness end
|
||||||
|
return hsluv.hsluv_to_hex(hsl)
|
||||||
|
end
|
||||||
|
return color
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.string_to_color(colors, value, default)
|
||||||
|
if not value or value == "" then return default end
|
||||||
|
|
||||||
|
-- If the value is a hex color code then return it
|
||||||
|
local hex = "[abcdef0-9][abcdef0-9]"
|
||||||
|
local pat = "^#" .. hex .. hex .. hex .. "$"
|
||||||
|
if string.match(value, pat) then return value end
|
||||||
|
|
||||||
|
local acceptable_colors = { "black", "red", "green", "blue", "magenta", "cyan", "text", "orange", "pink" }
|
||||||
|
for _, ac in ipairs(acceptable_colors) do
|
||||||
|
if string.match(value, ac) then return colors[value] end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Did not match anything to return default
|
||||||
|
return default
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.color_is_bright(r, g, b)
|
||||||
|
-- Counting the perceptive luminance - human eye favors green color
|
||||||
|
local luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255
|
||||||
|
if luminance > 0.5 then
|
||||||
|
return true -- Bright colors, black font
|
||||||
|
else
|
||||||
|
return false -- Dark colors, text font
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.hex2rgb(hex)
|
||||||
|
return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6))
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.assert_brightness(color)
|
||||||
|
local hex = color:gsub("#", "")
|
||||||
|
local r = M.hex2rgb(string.sub(hex, 1, 2))
|
||||||
|
local g = M.hex2rgb(string.sub(hex, 3, 4))
|
||||||
|
local b = M.hex2rgb(string.sub(hex, 5, 6))
|
||||||
|
|
||||||
|
if M.color_is_bright(tonumber(r), tonumber(g), tonumber(b)) == true then
|
||||||
|
return true -- bright
|
||||||
|
end
|
||||||
|
|
||||||
|
return false -- dull
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.vary_color(palettes, default)
|
||||||
|
local flvr = require("catppuccin").flavour
|
||||||
|
|
||||||
|
if palettes[flvr] ~= nil then return palettes[flvr] end
|
||||||
|
return default
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rgb2Hex(rgb)
|
||||||
|
local hexadecimal = "#"
|
||||||
|
|
||||||
|
for _, value in pairs(rgb) do
|
||||||
|
local hex = ""
|
||||||
|
|
||||||
|
while value > 0 do
|
||||||
|
local index = math.fmod(value, 16) + 1
|
||||||
|
value = math.floor(value / 16)
|
||||||
|
hex = string.sub(hsluv.hexChars, index, index) .. hex
|
||||||
|
end
|
||||||
|
|
||||||
|
if string.len(hex) == 0 then
|
||||||
|
hex = "00"
|
||||||
|
elseif string.len(hex) == 1 then
|
||||||
|
hex = "0" .. hex
|
||||||
|
end
|
||||||
|
|
||||||
|
hexadecimal = hexadecimal .. hex
|
||||||
|
end
|
||||||
|
|
||||||
|
return hexadecimal
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.increase_saturation(hex, percentage)
|
||||||
|
local rgb = hex_to_rgb(hex)
|
||||||
|
|
||||||
|
local saturation_float = percentage
|
||||||
|
|
||||||
|
table.sort(rgb)
|
||||||
|
local rgb_intensity = {
|
||||||
|
min = rgb[1] / 255,
|
||||||
|
mid = rgb[2] / 255,
|
||||||
|
max = rgb[3] / 255,
|
||||||
|
}
|
||||||
|
|
||||||
|
if rgb_intensity.max == rgb_intensity.min then
|
||||||
|
-- all colors have same intensity, which means
|
||||||
|
-- the original color is gray, so we can't change saturation.
|
||||||
|
return hex
|
||||||
|
end
|
||||||
|
|
||||||
|
local new_intensities = {}
|
||||||
|
new_intensities.max = rgb_intensity.max
|
||||||
|
new_intensities.min = rgb_intensity.max * (1 - saturation_float)
|
||||||
|
|
||||||
|
if rgb_intensity.mid == rgb_intensity.min then
|
||||||
|
new_intensities.mid = new_intensities.min
|
||||||
|
else
|
||||||
|
local intensity_proportion = (rgb_intensity.max - rgb_intensity.mid) / (rgb_intensity.mid - rgb_intensity.min)
|
||||||
|
new_intensities.mid = (intensity_proportion * new_intensities.min + rgb_intensity.max)
|
||||||
|
/ (intensity_proportion + 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i, v in pairs(new_intensities) do
|
||||||
|
new_intensities[i] = math.floor(v * 255)
|
||||||
|
end
|
||||||
|
table.sort(new_intensities)
|
||||||
|
return (rgb2Hex { new_intensities.max, new_intensities.min, new_intensities.mid })
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
return function(flavour)
|
||||||
|
local C = require("catppuccin.palettes").get_palette(flavour)
|
||||||
|
local O = require("catppuccin").options
|
||||||
|
local catppuccin = {}
|
||||||
|
|
||||||
|
local transparent_bg = O.transparent_background and "NONE" or C.mantle
|
||||||
|
|
||||||
|
catppuccin.normal = {
|
||||||
|
a = { bg = C.blue, fg = C.mantle, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.blue },
|
||||||
|
c = { bg = transparent_bg, fg = C.text },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.insert = {
|
||||||
|
a = { bg = C.green, fg = C.base, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.green },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.terminal = {
|
||||||
|
a = { bg = C.green, fg = C.base, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.green },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.command = {
|
||||||
|
a = { bg = C.peach, fg = C.base, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.peach },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.visual = {
|
||||||
|
a = { bg = C.mauve, fg = C.base, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.mauve },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.replace = {
|
||||||
|
a = { bg = C.red, fg = C.base, gui = "bold" },
|
||||||
|
b = { bg = C.surface0, fg = C.red },
|
||||||
|
}
|
||||||
|
|
||||||
|
catppuccin.inactive = {
|
||||||
|
a = { bg = transparent_bg, fg = C.blue },
|
||||||
|
b = { bg = transparent_bg, fg = C.surface1, gui = "bold" },
|
||||||
|
c = { bg = transparent_bg, fg = C.overlay0 },
|
||||||
|
}
|
||||||
|
|
||||||
|
return catppuccin
|
||||||
|
end
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.cursor(name, palette)
|
||||||
|
return {
|
||||||
|
name = name,
|
||||||
|
init = function() vim.opt.guicursor:append "a:ReactiveCursor" end,
|
||||||
|
modes = {
|
||||||
|
i = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.teal },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
no = {
|
||||||
|
operators = {
|
||||||
|
d = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.red },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
y = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.peach },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
c = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.blue },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
R = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.sapphire },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- visual
|
||||||
|
[{ "v", "V", "\x16" }] = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.mauve },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- select
|
||||||
|
[{ "s", "S", "\x13" }] = {
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = palette.pink },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.cursorline(name, palette)
|
||||||
|
local darken = require("catppuccin.utils.colors").darken
|
||||||
|
|
||||||
|
return {
|
||||||
|
name = name,
|
||||||
|
static = {
|
||||||
|
winhl = {
|
||||||
|
inactive = {
|
||||||
|
CursorLine = { bg = darken(palette.surface0, 0.75) },
|
||||||
|
CursorLineNr = { bg = darken(palette.surface0, 0.75) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
modes = {
|
||||||
|
-- insert mode
|
||||||
|
i = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = darken(palette.sky, 0.3) },
|
||||||
|
CursorLineNr = { bg = darken(palette.sky, 0.3) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- normal mode
|
||||||
|
n = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = palette.surface0 },
|
||||||
|
CursorLineNr = { bg = palette.surface0 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- operator-pending mode
|
||||||
|
no = {
|
||||||
|
operators = {
|
||||||
|
[{ "gu", "gU", "g~", "~" }] = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = palette.surface2 },
|
||||||
|
CursorLineNr = { bg = palette.surface2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- delete operator
|
||||||
|
d = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = darken(palette.red, 0.4) },
|
||||||
|
CursorLineNr = { bg = darken(palette.red, 0.4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- yank operator
|
||||||
|
y = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = darken(palette.peach, 0.3) },
|
||||||
|
CursorLineNr = { bg = darken(palette.peach, 0.3) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- change operator
|
||||||
|
c = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = darken(palette.blue, 0.4) },
|
||||||
|
CursorLineNr = { bg = darken(palette.blue, 0.4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
R = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = darken(palette.sapphire, 0.4) },
|
||||||
|
CursorLineNr = { bg = darken(palette.sapphire, 0.4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- visual mode
|
||||||
|
[{ "v", "V", "\x16" }] = {
|
||||||
|
winhl = {
|
||||||
|
Visual = { bg = darken(palette.mauve, 0.4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- select mode
|
||||||
|
[{ "s", "S", "\x13" }] = {
|
||||||
|
winhl = {
|
||||||
|
Visual = { bg = darken(palette.pink, 0.4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
(element
|
||||||
|
(start_tag
|
||||||
|
"<" @delimiter
|
||||||
|
(tag_name) @delimiter
|
||||||
|
">" @delimiter)
|
||||||
|
(end_tag
|
||||||
|
"</" @delimiter
|
||||||
|
(tag_name) @delimiter
|
||||||
|
">" @delimiter @sentinel)) @container
|
||||||
|
|
||||||
|
(interpolation
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
(command_substitution
|
||||||
|
"$(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(expansion
|
||||||
|
"${" @delimiter
|
||||||
|
(":-" @delimiter)?
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
;;; The double-bracket variant is a bashism
|
||||||
|
(test_command
|
||||||
|
["[[" "["] @delimiter
|
||||||
|
["]]" "]"] @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(subshell
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(array
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(function_definition
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(arithmetic_expansion
|
||||||
|
"$((" @delimiter
|
||||||
|
"))" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(compound_statement
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(subscript
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
@ -0,0 +1,143 @@
|
|||||||
|
(parenthesized_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(argument_list
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(parameter_list
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(if_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(foreach_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(for_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(while_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(do_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(tuple_type
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(tuple_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(attribute_argument_list
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(attribute_list
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(switch_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(switch_body
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(switch_expression
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(default_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(catch_declaration
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(catch_filter_clause
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(using_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(lock_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(cast_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(typeof_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(sizeof_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(checked_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(declaration_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(accessor_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(block
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(anonymous_object_creation_expression
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(enum_member_declaration_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(type_parameter_list
|
||||||
|
"<" @delimiter
|
||||||
|
">" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(type_argument_list
|
||||||
|
"<" @delimiter
|
||||||
|
">" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(initializer_expression
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(array_rank_specifier
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(bracketed_argument_list
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(implicit_array_creation_expression
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(implicit_stackalloc_expression
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.lualine" "frappe"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.lualine" "latte"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.lualine" "macchiato"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.lualine" "mocha"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.lualine"()
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
(list_lit
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(vec_lit
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(map_lit
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(set_lit
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(anon_fn_lit
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
(list_lit
|
||||||
|
"(" @delimiter
|
||||||
|
_*
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(defun
|
||||||
|
"(" @delimiter
|
||||||
|
_*
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(loop_macro
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel ) @container
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
;;; NOTE: The C and C++ grammar have diverged, so I cannot include the C query.
|
||||||
|
|
||||||
|
(parameter_list
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(argument_list
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(condition_clause
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(parenthesized_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(compound_statement
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(for_statement
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(cast_expression
|
||||||
|
"(" @delimiter
|
||||||
|
")" @delimiter @sentinel)
|
||||||
|
|
||||||
|
(initializer_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(array_declarator
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(subscript_argument_list
|
||||||
|
"[" @delimiter
|
||||||
|
"]" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(field_declaration_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(declaration_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(template_parameter_list
|
||||||
|
"<" @delimiter
|
||||||
|
">" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(initializer_list
|
||||||
|
"{" @delimiter
|
||||||
|
"}" @delimiter @sentinel) @container
|
||||||
|
|
||||||
|
(template_argument_list
|
||||||
|
"<" @delimiter
|
||||||
|
">" @delimiter @sentinel) @container
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user