diff --git a/lazy-lock.json b/lazy-lock.json index 8efb640..3b3c535 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,7 +14,6 @@ "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" }, "friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, - "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "impatient.nvim": { "branch": "main", "commit": "969f2c5c90457612c09cf2a13fee1adaa986d350" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, "jaq-nvim": { "branch": "master", "commit": "236296aae555657487d1bb4d066cbde9d79d8cd4" }, @@ -52,6 +51,7 @@ "telescope.nvim": { "branch": "master", "commit": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2" }, "todo-comments.nvim": { "branch": "main", "commit": "077c59586d9d0726b0696dc5680eb863f4e04bc5" }, "toggleterm.nvim": { "branch": "main", "commit": "a5638b2206c3930a16a24e5c184dddd572f8cd34" }, + "tokyonight.nvim": { "branch": "main", "commit": "57ed37148ffcf05d68df8e06d4eec2b74bf62601" }, "trouble.nvim": { "branch": "main", "commit": "67337644e38144b444d026b0df2dc5fa0038930f" }, "vim-bbye": { "branch": "master", "commit": "903f5eb17f72ebf7b0b1524bbb792c0b36761af6" }, "vim-illuminate": { "branch": "master", "commit": "49062ab1dd8fec91833a69f0a1344223dd59d643" }, diff --git a/lua/custom/ui.lua b/lua/custom/ui.lua index 52c671f..80fe62d 100644 --- a/lua/custom/ui.lua +++ b/lua/custom/ui.lua @@ -31,5 +31,8 @@ m.status_icon = 0 -- catppuccin -- dracula m.colorscheme = "gruvbox-baby" - +-- custom transparent mode +-- support gruvbox-baby dan tokyonight +-- 0 =off 1= on +m.transparent_mode = 0 return m diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 600d69e..5a11f25 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -84,7 +84,13 @@ return { -- color scheme { "luisiacc/gruvbox-baby", lazy = true, enabled = gruvbox }, { "dracula/vim", enabled = dracula }, - { "folke/tokyonight.nvim", enabled = tokyonight }, + { + "folke/tokyonight.nvim", + enabled = tokyonight, + config = function() + require("user.tokyonight") + end, + }, { "arcticicestudio/nord-vim", enabled = nord }, { "sainnhe/sonokai", enabled = sonokai }, { "lunarvim/lunar.nvim", enabled = lunar }, diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua index 8d851f8..b9da504 100644 --- a/lua/user/colorscheme.lua +++ b/lua/user/colorscheme.lua @@ -8,6 +8,12 @@ if data_exists then else colorscheme = "gruvbox-baby" end + local transparent_mode = custom_ui.transparent_mode + if transparent_mode ~= nil then + if transparent_mode == 1 then + vim.g.gruvbox_baby_transparent_mode = 1 + end + end end end local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) diff --git a/lua/user/tokyonight.lua b/lua/user/tokyonight.lua index 08e8125..1f81722 100644 --- a/lua/user/tokyonight.lua +++ b/lua/user/tokyonight.lua @@ -2,12 +2,24 @@ local status_ok, tokyonight = pcall(require, "tokyonight") if not status_ok then return end +local transp = false +local sidebar = "dark" +local data_exists, custom_ui = pcall(require, "custom.ui") +if data_exists then + if type(custom_ui) == "table" then + local tras = custom_ui.transparent_mode + if tras ~= nil and tras == 1 then + transp = true + sidebar = "transparent" + end + end +end tokyonight.setup({ -- your configuration comes here -- or leave it empty to use the default settings style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` light_style = "day", -- The theme is used when the background is set to light - transparent = false, -- Enable this to disable setting the background color + transparent = transp, -- Enable this to disable setting the background color terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim styles = { -- Style to be applied to different syntax groups @@ -18,8 +30,8 @@ tokyonight.setup({ functions = {}, variables = {}, -- Background styles. Can be "dark", "transparent" or "normal" - sidebars = "dark", -- style for sidebars, see below - floats = "dark", -- style for floating windows + sidebars = sidebar, -- style for sidebars, see below + floats = sidebar, -- style for floating windows }, sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` day_brightness = 0.2, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors