初始化dotfiles
This commit is contained in:
42
nvim/lua/plugins/colorscheme.lua
Normal file
42
nvim/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,42 @@
|
||||
-- ============================================================================
|
||||
-- 主题 (tokyonight)
|
||||
-- 透明背景,与终端透明效果融合
|
||||
-- ============================================================================
|
||||
|
||||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
style = "night",
|
||||
transparent = true,
|
||||
styles = {
|
||||
sidebars = "transparent",
|
||||
floats = "transparent",
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user