Skip to content

Commit

Permalink
Merge branch 'main' into refactor/syntax-highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jint-lzxy committed Nov 6, 2023
2 parents 2c814f4 + d7521f6 commit 9da4a01
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 67 deletions.
83 changes: 44 additions & 39 deletions autoload/airline/themes/catppuccin.vim
Original file line number Diff line number Diff line change
@@ -1,54 +1,59 @@
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')
let g:airline#themes#catppuccin#palette = {}

" Normal mode
" (Dark)
let s:N1 = [ s:c.mantle, s:c.blue, 59, 149 ] " guifg guibg ctermfg ctermbg
let s:N2 = [ s:c.blue, s:c.mantle, 149, 59 ] " guifg guibg ctermfg ctermbg
let s:N3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
function! airline#themes#catppuccin#refresh()
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')

" Insert mode
let s:I1 = [ s:c.mantle, s:c.teal, 59, 74 ] " guifg guibg ctermfg ctermbg
let s:I2 = [ s:c.teal, s:c.mantle, 74, 59 ] " guifg guibg ctermfg ctermbg
let s:I3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
" Normal mode
" (Dark)
let s:N1 = [ s:c.mantle, s:c.blue, 59, 149 ] " guifg guibg ctermfg ctermbg
let s:N2 = [ s:c.blue, s:c.mantle, 149, 59 ] " guifg guibg ctermfg ctermbg
let s:N3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg

" Visual mode
let s:V1 = [ s:c.mantle, s:c.mauve, 59, 209 ] " guifg guibg ctermfg ctermbg
let s:V2 = [ s:c.mauve, s:c.mantle, 209, 59 ] " guifg guibg ctermfg ctermbg
let s:V3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
" Insert mode
let s:I1 = [ s:c.mantle, s:c.teal, 59, 74 ] " guifg guibg ctermfg ctermbg
let s:I2 = [ s:c.teal, s:c.mantle, 74, 59 ] " guifg guibg ctermfg ctermbg
let s:I3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg

" Replace mode
let s:RE = [ s:c.mantle, s:c.red, 59, 203 ] " guifg guibg ctermfg ctermbg
" Visual mode
let s:V1 = [ s:c.mantle, s:c.mauve, 59, 209 ] " guifg guibg ctermfg ctermbg
let s:V2 = [ s:c.mauve, s:c.mantle, 209, 59 ] " guifg guibg ctermfg ctermbg
let s:V3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg

" Warning section
let s:WR = [s:c.mantle, s:c.peach, 232, 166 ]
" Replace mode
let s:RE = [ s:c.mantle, s:c.red, 59, 203 ] " guifg guibg ctermfg ctermbg

" Error section
let s:ER = [s:c.mantle, s:c.red, 232, 166 ]
" Warning section
let s:WR = [s:c.mantle, s:c.peach, 232, 166 ]

let g:airline#themes#catppuccin#palette = {}
" Error section
let s:ER = [s:c.mantle, s:c.red, 232, 166 ]


let g:airline#themes#catppuccin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)

let g:airline#themes#catppuccin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#catppuccin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#catppuccin#palette.insert_replace = {
\ 'airline_a': [ s:RE[0], s:I1[1], s:RE[1], s:I1[3], '' ] }

let g:airline#themes#catppuccin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#catppuccin#palette.insert_replace = {
\ 'airline_a': [ s:RE[0], s:I1[1], s:RE[1], s:I1[3], '' ] }
let g:airline#themes#catppuccin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)

let g:airline#themes#catppuccin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#catppuccin#palette.replace = copy(g:airline#themes#catppuccin#palette.normal)
let g:airline#themes#catppuccin#palette.replace.airline_a = [ s:RE[0], s:RE[1], s:RE[2], s:RE[3], '' ]

let g:airline#themes#catppuccin#palette.replace = copy(g:airline#themes#catppuccin#palette.normal)
let g:airline#themes#catppuccin#palette.replace.airline_a = [ s:RE[0], s:RE[1], s:RE[2], s:RE[3], '' ]
let s:IA = [ s:N1[1], s:N3[1], s:N1[3], s:N3[3], '' ]
let g:airline#themes#catppuccin#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)

let s:IA = [ s:N1[1], s:N3[1], s:N1[3], s:N3[3], '' ]
let g:airline#themes#catppuccin#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#catppuccin#palette.normal.airline_warning = s:WR
let g:airline#themes#catppuccin#palette.insert.airline_warning = s:WR
let g:airline#themes#catppuccin#palette.visual.airline_warning = s:WR

let g:airline#themes#catppuccin#palette.normal.airline_warning = s:WR
let g:airline#themes#catppuccin#palette.insert.airline_warning = s:WR
let g:airline#themes#catppuccin#palette.visual.airline_warning = s:WR
let g:airline#themes#catppuccin#palette.normal.airline_warning_to_airline_error = s:WR
let g:airline#themes#catppuccin#palette.insert.airline_warning_to_airline_error = s:WR
let g:airline#themes#catppuccin#palette.visual.airline_warning_to_airline_error = s:WR

let g:airline#themes#catppuccin#palette.normal.airline_warning_to_airline_error = s:WR
let g:airline#themes#catppuccin#palette.insert.airline_warning_to_airline_error = s:WR
let g:airline#themes#catppuccin#palette.visual.airline_warning_to_airline_error = s:WR
let g:airline#themes#catppuccin#palette.normal.airline_error = s:ER
let g:airline#themes#catppuccin#palette.insert.airline_error = s:ER
let g:airline#themes#catppuccin#palette.visual.airline_error = s:ER
endfunction

let g:airline#themes#catppuccin#palette.normal.airline_error = s:ER
let g:airline#themes#catppuccin#palette.insert.airline_error = s:ER
let g:airline#themes#catppuccin#palette.visual.airline_error = s:ER
call airline#themes#catppuccin#refresh()
1 change: 1 addition & 0 deletions lua/catppuccin/groups/integrations/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function M.get(user_config)
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
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/groups/integrations/flash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function M.get()
FlashLabel = { fg = C.green, bg = bg, style = { "bold" } },
FlashMatch = { fg = C.lavender, bg = bg },
FlashCurrent = { fg = C.peach, bg = bg },
FlashPrompt = { link = "NormalFloat" },
}
end

Expand Down
2 changes: 1 addition & 1 deletion lua/catppuccin/groups/integrations/neotree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function M.get()
NeoTreeGitIgnored = { fg = C.overlay0 },
NeoTreeGitModified = { fg = C.yellow },
NeoTreeGitUnstaged = { fg = C.red },
NeoTreeGitUntracked = { fg = C.blue },
NeoTreeGitUntracked = { fg = C.mauve },
NeoTreeGitStaged = { fg = C.green },

NeoTreeFloatBorder = { link = "FloatBorder" },
Expand Down
4 changes: 2 additions & 2 deletions lua/catppuccin/utils/lualine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ return function(flavour)

catppuccin.insert = {
a = { bg = C.green, fg = C.base, gui = "bold" },
b = { bg = C.surface1, fg = C.teal },
b = { bg = C.surface1, fg = C.green },
}

catppuccin.terminal = {
a = { bg = C.green, fg = C.base, gui = "bold" },
b = { bg = C.surface1, fg = C.teal },
b = { bg = C.surface1, fg = C.green },
}

catppuccin.command = {
Expand Down
176 changes: 151 additions & 25 deletions vim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,62 +216,94 @@ globals:
type: table
property: read-only

O.integrations.cmp:
type: bool
property: read-only
O.integrations.dashboard:
O.integrations.aerial:
type: bool
property: read-only
O.integrations.alpha:
type: bool
property: read-only
O.integrations.flash:
O.integrations.barbar:
type: bool
property: read-only
O.integrations.gitsigns:

O.integrations.barbecue.dim_dirname:
type: bool
property: full-write
O.integrations.markdown:
property: read-only
O.integrations.barbecue.bold_basename:
type: bool
property: read-only
O.integrations.nvimtree:
O.integrations.barbecue.dim_context:
type: bool
property: read-only
O.integrations.semantic_tokens:
O.integrations.barbecue.alt_background:
type: bool
property: read-only

O.integrations.telescope.enabled:
O.integrations.beacon:
type: bool
property: read-only
O.integrations.telescope.style:
type: string

O.integrations.cmp:
type: bool
property: read-only

O.integrations.treesitter:
O.integrations.coc_nvim:
type: bool
property: read-only
O.integrations.ts_rainbow:

O.integrations.dap.enabled:
type: bool
property: read-only
O.integrations.ts_rainbow2:
O.integrations.dap.enable_ui:
type: bool
property: read-only
O.integrations.rainbow_delimiters:

O.integrations.dashboard:
type: bool
property: read-only

O.integrations.window_picker:
O.integrations.dropbar:
type: table
property: read-only
O.integrations.dropbar.enabled:
type: bool
property: read-only
O.integrations.dropbar.color_mode:
type: bool
property: read-only

O.integrations.barbecue.dim_dirname:
O.integrations.feline:
type: bool
property: read-only
O.integrations.barbecue.bold_basename:
O.integrations.fern:
type: bool
property: read-only
O.integrations.barbecue.dim_context:
O.integrations.fidget:
type: bool
property: read-only
O.integrations.flash:
type: bool
property: read-only
O.integrations.gitgutter:
type: bool
property: read-only
O.integrations.gitsigns:
type: bool
property: full-write
O.integrations.harpoon:
type: bool
property: read-only
O.integrations.headlines:
type: bool
property: read-only
O.integrations.hop:
type: bool
property: read-only

O.integrations.illuminate.enabled:
type: bool
property: read-only
O.integrations.illuminate.lsp:
type: bool
property: read-only

Expand All @@ -285,6 +317,25 @@ globals:
type: bool
property: read-only

O.integrations.leap:
type: bool
property: read-only
O.integrations.lightspeed:
type: bool
property: read-only
O.integrations.lsp_saga:
type: bool
property: read-only
O.integrations.lsp_trouble:
type: bool
property: read-only
O.integrations.markdown:
type: bool
property: read-only
O.integrations.mason:
type: bool
property: read-only

O.integrations.mini.enabled:
type: bool
property: read-only
Expand Down Expand Up @@ -336,13 +387,88 @@ globals:
type: string
property: read-only

O.integrations.dropbar:
type: table
O.integrations.neogit:
type: bool
property: read-only
O.integrations.dropbar.enabled:
O.integrations.neotest:
type: bool
property: read-only
O.integrations.dropbar.color_mode:
O.integrations.neotree:
type: bool
property: read-only
O.integrations.noice:
type: bool
property: read-only
O.integrations.NormalNvim:
type: bool
property: read-only
O.integrations.notifier:
type: bool
property: read-only
O.integrations.notify:
type: bool
property: read-only
O.integrations.nvimtree:
type: bool
property: read-only
O.integrations.octo:
type: bool
property: read-only
O.integrations.overseer:
type: bool
property: read-only
O.integrations.pounce:
type: bool
property: read-only
O.integrations.rainbow_delimiters:
type: bool
property: read-only
O.integrations.sandwich:
type: bool
property: read-only
O.integrations.semantic_tokens:
type: bool
property: read-only
O.integrations.symbols_outline:
type: bool
property: read-only
O.integrations.telekasten:
type: bool
property: read-only

O.integrations.telescope.enabled:
type: bool
property: read-only
O.integrations.telescope.style:
type: string
property: read-only

O.integrations.treesitter:
type: bool
property: read-only
O.integrations.treesitter_context:
type: bool
property: read-only
O.integrations.ts_rainbow:
type: bool
property: read-only
O.integrations.ts_rainbow2:
type: bool
property: read-only

O.integrations.ufo:
type: bool
property: read-only
O.integrations.vim_sneak:
type: bool
property: read-only
O.integrations.vimwiki:
type: bool
property: read-only
O.integrations.which_key:
type: bool
property: read-only
O.integrations.window_picker:
type: bool
property: read-only

Expand Down

0 comments on commit 9da4a01

Please sign in to comment.