From 30537367c169c499539030ff3bd23b1c10c4634d Mon Sep 17 00:00:00 2001 From: "asep.komarudin" Date: Sun, 26 May 2024 20:27:44 +0700 Subject: [PATCH] add: config colorscheme solarized osaka --- lazy-lock.json | 6 ++-- lua/custom/default.lua | 3 +- lua/plugins/colorscheme.lua | 58 ++++++++++++++++++++++++++++++++++++- lua/user/colorscheme.lua | 5 +++- 4 files changed, 67 insertions(+), 5 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 332cc3a..51466de 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,7 +10,6 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "code_runner.nvim": { "branch": "main", "commit": "d135c4178bf8980ca5fa4aa6e27ab9ee4373c875" }, "codeium.vim": { "branch": "main", "commit": "289eb724e5d6fab2263e94a1ad6e54afebefafb2" }, - "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, "dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" }, @@ -37,20 +36,23 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" }, "nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" }, - "nvim-treesitter": { "branch": "master", "commit": "488e39a8f1fcb7935deaaf1852e3d6c28ca253d0" }, + "nvim-treesitter": { "branch": "master", "commit": "245da4eb2e52d14b034bbbedec9671e997ede764" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" }, "nvim-ts-autotag": { "branch": "main", "commit": "8ae54b90e36ef1fc5267214b30c2cbff71525fe4" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, "nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, + "onedarkpro.nvim": { "branch": "main", "commit": "ec07364f3cfa9cc6467bf067a490cfd74011efcd" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, "smart-splits.nvim": { "branch": "master", "commit": "2179ec0d26aacd4f40c766c79f6ebc83b7001e48" }, + "solarized-osaka.nvim": { "branch": "main", "commit": "0083cb237870d3da7ea4b566c8932a8e8dc209cb" }, "statuscol.nvim": { "branch": "main", "commit": "483b9a596dfd63d541db1aa51ee6ee9a1441c4cc" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telescope.nvim": { "branch": "master", "commit": "c2ce039188e22288449e43b77710036e69a45a70" }, "toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" }, + "transparent.nvim": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" }, "vim-visual-multi": { "branch": "master", "commit": "1c9207b28c8898ab01b54e6d6b61b0b820a814bc" }, diff --git a/lua/custom/default.lua b/lua/custom/default.lua index 2c48cdd..6b5d4ce 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -12,7 +12,8 @@ -- dracula -- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox -- github_dark, github_dark_default, github_dark_colorblind, github_dark_dimmed -vim.g.pcode_colorscheme = "dracula" +-- solarized-osaka +vim.g.pcode_colorscheme = "solarized-osaka" -- 0 =off 1= on vim.g.pcode_transparent_mode = 0 diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index e9e2cab..2ca728c 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -513,7 +513,7 @@ return { priority = 1000, -- make sure to load this before all the other start plugins enabled = substring(tostring(color), "github") and true or false, config = function() - local is_transparent = false + local is_transparent = (transparent_mode == 1) and true or false local palette = require("github-theme.palette").load "github_dark_dimmed" require("github-theme").setup { options = { @@ -613,4 +613,60 @@ return { } end, }, + { + "craftzdog/solarized-osaka.nvim", + lazy = false, + priority = 1000, + enabled = substring(tostring(color), "solarized") and true or false, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + transparent = (transparent_mode == 1) and true or false, -- Enable this to disable setting the background color + terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) + styles = { + -- Style to be applied to different syntax groups + -- Value is any valid attr-list value for `:help nvim_set_hl` + comments = { italic = true }, + keywords = { italic = true }, + functions = {}, + variables = {}, + -- Background styles. Can be "dark", "transparent" or "normal" + sidebars = (transparent_mode == 1) and "transparent" or "normal", -- style for sidebars, see below + floats = "dark", -- 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.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors + hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. + dim_inactive = false, -- dims inactive windows + lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold + + --- You can override specific color groups to use other groups or a hex color + --- function will be called with a ColorScheme table + --@param colors ColorScheme + on_colors = function(colors) + colors.bg_statusline = colors.none + end, + + --- You can override specific highlights to use other groups or a hex color + --- function will be called with a Highlights and ColorScheme table + --@param highlights Highlights + --@param colors ColorScheme + on_highlights = function(highlights, colors) + highlights.NvimTreeWinSeparator = { + fg = colors.border, + } + highlights.Underlined = { + underline = false, + } + highlights.BufferLineFill = { bg = colors.bg } + highlights.StatusLine = { bg = colors.none, fg = colors.fg } + highlights.StatusLineNC = { bg = colors.none, fg = colors.fg } + highlights.NvimTreeSpecialFile = { fg = colors.purple, underline = false } + highlights["@tag.attribute"] = { fg = colors.green1, italic = true } + end, + }, + config = function(_, opts) + require("solarized-osaka").setup(opts) + end, + }, } diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua index a245c18..68091a2 100644 --- a/lua/user/colorscheme.lua +++ b/lua/user/colorscheme.lua @@ -6,4 +6,7 @@ elseif substring(tostring(colorscheme), "material") then colorscheme = "material" end -vim.cmd("colorscheme " .. colorscheme) +local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not status_ok then + return +end