nvim-config/lua/custom/plugins/colorscheme.lua
Nikola Savic f8596bb0c6 v1.0
2024-09-09 14:13:06 +02:00

71 lines
2.3 KiB
Lua

return {
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000,
config = function()
require('catppuccin').setup {
flavour = 'auto', -- latte, frappe, macchiato, mocha
background = { -- :h background
light = 'latte',
dark = 'mocha',
},
transparent_background = true, -- disables setting the background color.
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
dim_inactive = {
enabled = false, -- dims the background color of inactive window
shade = 'dark',
percentage = 0.15, -- percentage of the shade to apply to the inactive window
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = { 'italic' }, -- Change the style of comments
conditionals = { 'italic' },
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
-- miscs = {}, -- Uncomment to turn off hard-coded styles
},
color_overrides = {},
custom_highlights = {},
default_integrations = true,
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = true,
indentscope_color = '',
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
}
-- -- Toggle background transparency
local bg_transparent = true
--
local toggle_transparency = function()
bg_transparent = not bg_transparent
-- vim.g.transparent_background = bg_transparent
require('catppuccin').setup {
transparent_background = bg_transparent,
}
vim.cmd [[colorscheme catppuccin]]
end
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
-- setup must be called before loading
vim.cmd.colorscheme 'catppuccin'
end,
}