Files
dotfiles/nvim/lua/plugins/colorscheme.lua
T
2026-07-19 19:36:54 +08:00

45 lines
1.4 KiB
Lua

-- =============================================================================
-- colorscheme.lua — 主题
-- =============================================================================
return {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {
style = "night",
transparent = true,
styles = {
sidebars = "transparent",
floats = "transparent",
},
on_highlights = function(hl, c)
-- bufferline 标签栏背景透明
hl.BufferLineFill = { bg = "NONE" }
hl.BufferLineBackGround = { bg = "NONE", fg = c.fg_gutter }
hl.BufferLineBackGroundVisible = { bg = "NONE", fg = c.fg }
hl.BufferLineBackGroundSelected = { bg = c.bg_highlight, fg = c.fg, bold = true }
hl.BufferLineSeparator = { fg = c.fg_gutter }
hl.BufferLineSeparatorSelected = { fg = c.blue }
end,
},
config = function(_, opts)
require("tokyonight").setup(opts)
vim.cmd.colorscheme("tokyonight")
-- inlay hints 去掉背景
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "tokyonight",
callback = function()
vim.api.nvim_set_hl(0, "LspInlayHint", {
bg = "NONE", fg = "#565f89", italic = true,
})
end,
})
vim.api.nvim_set_hl(0, "LspInlayHint", {
bg = "NONE", fg = "#565f89", italic = true,
})
end,
},
}