荧光机器
荧光机器是流行的Synthwave84配色方案的一个分支,灵感来源于20世纪80年代的美学和被称为合成波的复古未来主义风格。荧光机器(配色方案)将这种霓虹浸染的风格融入其设计中,带有一种发光效果,为您的编码体验增添了一丝科幻感。
安装
要安装荧光机器,您需要一个插件管理器。
使用Lazy.nvim的示例
return {
{
'maxmx03/fluoromachine.nvim',
lazy = false,
priority = 1000,
config = function ()
local fm = require 'fluoromachine'
fm.setup {
glow = true,
theme = 'fluoromachine',
transparent = true,
}
vim.cmd.colorscheme 'fluoromachine'
end
}
}
注解
lspconfig.lua_ls.setup {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
'~/.local/share/nvim/lazy/fluoromachine.nvim',
},
},
hint = {
enable = true,
},
completion = {
callSnippet = 'Replace',
},
},
},
capabilities = capabilities,
}
默认配置
{
theme = 'fluoromachine',
brightness = 0.05,
glow = true,
transparent = false,
styles = {
comments = {},
functions = {},
variables = {},
numbers = {},
constants = {},
parameters = {},
keywords = {},
types = {},
},
colors = {},
overrides = {},
plugins = {
bufferline = true,
cmp = true,
dashboard = true,
editor = true,
gitsign = true,
hop = true,
ibl = true,
illuminate = true,
lazy = true,
minicursor = true,
ministarter = true,
minitabline = true,
ministatusline = true,
navic = true,
neogit = true,
neotree = true,
noice = true,
notify = true,
lspconfig = true,
syntax = true,
telescope = true,
treesitter = true,
tree = true,
wk = true,
},
}
配置
示例:
---@type fluoromachine
local fm = require 'fluoromachine'
fm.setup {
glow = true,
theme = 'retrowave',
transparent = false,
plugins = {
neotree = false,
}
}
vim.cmd.colorscheme('fluoromachine')
自定义
荧光机器是一个完全可自定义的配色方案,您甚至可以在荧光机器内创建一个配色方案。您可以添加新颜色、添加新的高亮组,并更新高亮组。
示例
更改配色方案样式。
local fm = require 'fluoromachine'
fm.setup {
overrides = {
['@type'] = { italic = true, bold = false },
['@function'] = { italic = false, bold = false },
['@comment'] = { italic = true },
['@keyword'] = { italic = false },
['@constant'] = { italic = false, bold = false },
['@variable'] = { italic = true },
['@field'] = { italic = true },
['@parameter'] = { italic = true },
}
}
vim.cmd.colorscheme 'fluoromachine'
自定义Telescope。
"callback overrides"函数接收"colors"、"darken"、"lighten"和"blend"作为参数。"darken"函数接受两个参数:您想要使其变暗的颜色和暗度百分比。"lighten"函数的工作方式与"darken"相同。"blend"函数接受三个参数:颜色、背景和透明度。
local fm = require 'fluoromachine'
function overrides(c,color)
local darken = color.darken
local lighten = color.lighten
local blend = color.blend
local shade = color.shade
local tint = color.tint
return {
TelescopeResultsBorder = { fg = c.bgdark, bg = c.bgdark },
TelescopeResultsNormal = { bg = c.bgdark },
TelescopePreviewNormal = { bg = c.bg },
TelescopePromptBorder = { fg = c.bgdark, bg = c.bgdark },
TelescopeTitle = { fg = c.red, bg = shade(c.red,5) },
TelescopePromptPrefix = { fg = c.purple },
}
end
fm.setup {
overrides = overrides
}
自定义颜色
您可以以与自定义高亮组相同的方式自定义颜色。 颜色回调函数接收与overrides相同的参数。 添加或自定义的颜色可以在后续的overrides中使用。
local fm = require 'fluoromachine'
fm.setup {
glow = true,
theme = 'retrowave',
colors = function(_, color)
local darken = color.darken
local lighten = color.lighten
local blend = color.blend
local shade = color.shade
local tint = color.tint
return {
bg = '#190920',
bgdark = darken('#190920', 20),
cyan = '#49eaff',
red = '#ff1e34',
yellow = '#ffe756',
orange = '#f38e21',
pink = '#ffadff',
purple = '#9544f7',
}
end,
}
vim.cmd.colorscheme 'fluoromachine'
Lualine
主题:fluoromachine
retrowave
delta
local lualine = require 'lualine'
lualine.setup {
options = {
theme = 'fluoromachine'
}
}
贡献
欢迎提交拉取请求。
要了解更多关于配色方案的信息,请阅读 SPECIFICATION.md