Browse Source

catppuccin and theme toggle

imac
Juni Kim 2 years ago
parent
commit
b67e03b6e5
  1. 1
      lua/junikim/init.lua
  2. 15
      lua/junikim/packer.lua
  3. 9
      lua/junikim/theme.lua

1
lua/junikim/init.lua

@ -1,3 +1,4 @@
require("junikim.packer")
require("junikim.theme")
require("junikim.options")
require("junikim.remap")

15
lua/junikim/packer.lua

@ -8,11 +8,18 @@ return require('packer').startup(function(use)
requires = { { 'nvim-lua/plenary.nvim' } }
}
use 'Townk/vim-autoclose'
use {
'joshdick/onedark.vim', config = function()
vim.cmd("colorscheme onedark")
end
use { "catppuccin/nvim", as = "catppuccin" }
--[[
use { "jonstoler/werewolf.vim", config = function()
-- default 8, use 24 hour format
vim.g.werewolf_day_start = 8
vim.g.werewolf_day_end = 18
-- werewolf
vim.g.werewolf_day_themes = { 'catppuccin-latte' }
vim.g.werewolf_night_themes = { 'catppuccin-mocha' }
end
}
]]--
use(
'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }
)

9
lua/junikim/theme.lua

@ -0,0 +1,9 @@
local day = 9
local night = 19
local hour = os.date("*t").hour
if day <= hour and hour < night then
vim.cmd([[ colorscheme catppuccin-latte ]])
else
vim.cmd([[ colorscheme catppuccin-mocha ]])
end
Loading…
Cancel
Save