Browse Source

change to gruvbox theme

imac
junikimm717 12 months ago
parent
commit
d59a37c6d5
  1. 6
      after/plugin/barbar.lua
  2. 4
      after/plugin/lsp.lua
  3. 2
      after/plugin/lualine.lua
  4. 3
      lua/junikim/packer.lua
  5. 14
      lua/junikim/theme.lua

6
after/plugin/barbar.lua

@ -42,5 +42,9 @@ map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
require('bufferline').setup {
animation = false,
icon_pinned = '',
icons = {
pinned = {
button = '',
},
},
}

4
after/plugin/lsp.lua

@ -88,7 +88,7 @@ require('mason').setup()
require("mason-nvim-dap").setup({
automatic_setup = true,
})
require 'mason-nvim-dap'.setup_handlers {}
--require 'mason-nvim-dap'.setup_handlers {}
require('mason-null-ls').setup({
@ -97,4 +97,4 @@ require('mason-null-ls').setup({
automatic_setup = true,
})
require('mason-null-ls').setup_handlers()
--require('mason-null-ls').setup_handlers()

2
after/plugin/lualine.lua

@ -9,7 +9,7 @@ require('lualine').setup {
icons_enabled = true,
--theme = 'auto',
--theme = 'onedark',
theme = "catppuccin",
theme = "gruvbox",
--component_separators = { left = '', right = '' },
--component_separators = { left = '', right = '' },
--section_separators = { left = '', right = '' },

3
lua/junikim/packer.lua

@ -10,7 +10,8 @@ return require('packer').startup(function(use)
use {
'windwp/nvim-autopairs'
}
use { "catppuccin/nvim", as = "catppuccin" }
--use { "catppuccin/nvim", as = "catppuccin" }
use { "ellisonleao/gruvbox.nvim", as = "gruvbox" }
use(
'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }
)

14
lua/junikim/theme.lua

@ -1,12 +1,11 @@
require('catppuccin').setup {
transparent_background = false,
require('gruvbox').setup {
}
local day = 9
local night = 18
local hour = os.date("*t").hour
local themes = { "catppuccin-macchiato", "catppuccin-mocha" }
local themes = { "gruvbox", "gruvbox" }
local theme = 1
if day <= hour and hour < night then
@ -15,14 +14,21 @@ else
theme = 2
end
vim.cmd.colorscheme(themes[theme])
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
local function toggletheme()
if theme == 1 then
theme = 2
vim.cmd('set background=dark')
else
theme = 1
vim.cmd('set background=light')
end
vim.cmd.colorscheme(themes[theme])
--vim.cmd.colorscheme(themes[theme])
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
vim.api.nvim_create_user_command("ToggleTheme", toggletheme, {})
Loading…
Cancel
Save