-- ============================================================================= -- 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, }, }