-- Auto-generated by Matugen require('base16-colorscheme').setup({ base00 = '{{colors.background.default.hex}}', -- 背景 base01 = '{{colors.surface_container_lowest.default.hex}}', --较浅的背景色 base02 = '{{colors.surface_container_low.default.hex}}', base03 = '{{colors.primary.default.hex}}', -- 键盘字符,匹配大括号 base04 = '{{colors.on_surface_variant.default.hex}}', base05 = '{{colors.primary.default.hex}}', -- 括号,运算符 base06 = '{{colors.inverse_on_surface.default.hex}}', base07 = '{{colors.surface_bright.default.hex}}', base08 = '{{colors.tertiary.default.hex}}',-- 变量名 base09 = '{{colors.secondary_fixed.default.hex}}', -- 整数、布尔值 (True/False)。 base0A = '{{colors.secondary.default.hex}}', --类名 (Class)、搜索匹配到的背景 base0B = '{{colors.primary_fixed_dim.default.hex}}', -- 字符串 base0C = '{{colors.tertiary_fixed_dim.default.hex}}', base0D = '{{colors.primary_container.default.hex}}', -- 函数名 base0E = '{{colors.secondary_fixed_dim.default.hex}}', -- 关键词 (if, else, return, import)。 base0F = '{{colors.error.default.hex}}', }) -- We first theme base16, but we also need to fix some other colors that don't -- contrast well by default -- Helper function to set multiple highlight groups at once local function set_hl_mutliple(groups, value) for _, v in pairs(groups) do vim.api.nvim_set_hl(0, v, value) end end -- Make selected text stand out more vim.api.nvim_set_hl(0, 'Visual', { bg = '{{colors.on_surface.default.hex}}', -- 选中文字背景 fg = '{{colors.surface.default.hex}}', -- 选中文字颜色 }) set_hl_mutliple({ 'TSComment', 'Comment' }, { fg = '{{colors.outline.default.hex}}', -- 注释 }) set_hl_mutliple({ 'TSMethod', 'Method' }, { fg = '{{colors.tertiary.default.hex}}', }) set_hl_mutliple({ 'TSFunction', 'Function' }, { fg = '{{colors.secondary.default.hex}}', }) vim.api.nvim_set_hl(0, 'Keyword', { fg = '{{colors.inverse_primary.default.hex}}', }) vim.api.nvim_set_hl(0, 'MsgArea', { bg = '{{colors.surface_container.default.hex}}', --底边 fg = '{{colors.primary.default.hex}}', })