summary refs log tree commit diff
path: root/.vim
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-08-17 15:26:36 +0200
committerRobert Günzler <r@gnzler.io>2022-08-17 15:26:36 +0200
commit5feb09d4f6e9c4d2b8a6f2b8ac29911850824046 (patch)
tree8cd4061a03e5bd0b37fa5a4646f96e6abdd7a93e /.vim
parent09c5d3a1e9e27e307524457b008a7ec6976e39fc (diff)
vim: switch light and dark colorscheme based on variable
Diffstat (limited to '.vim')
-rw-r--r--.vim/init.lua3
-rw-r--r--.vim/lua/plugins.lua18
2 files changed, 17 insertions, 4 deletions
diff --git a/.vim/init.lua b/.vim/init.lua
index 8567589..5c77827 100644
--- a/.vim/init.lua
+++ b/.vim/init.lua
@@ -99,6 +99,9 @@ g.undodir = undodir
 opt.undofile = true
 -- }}}
 
+-- swap between newpaper and karafuru
+g.night_and_day = 'night'
+
 g.do_filetype_lua = true
 -- g.do_legacy_filetype = false
 -- g.did_load_filetypes = 0
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index aa914d1..66eccfe 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -1174,15 +1174,25 @@ require('packer').startup({function()
     end} -- }}}
 
 
-  -- NOTE: local/personal stuff
-  use {'~/devel/projects/k2', rtp = 'nvim',
+  use {'yorik1984/newpaper.nvim',
     config = function()
-      require('k2').setup()
+      if vim.g.night_and_day == 'day' then
+        require('newpaper').setup()
+      end
     end}
   -- use {'https://git.sr.ht/~robertgzr/karafuru', rtp = 'vim',
   use {'~/devel/projects/karafuru', rtp = 'vim', disable = false,
     run = 'make colorscheme',
-    config = function() vim.cmd [[colorscheme karafuru]] end}
+    config = function()
+      if not vim.g.night_and_day or vim.g.night_and_day == 'night' then
+        vim.cmd [[colorscheme karafuru]]
+      end
+    end}
+
+  use {'~/devel/projects/k2', rtp = 'nvim',
+    config = function()
+      require('k2').setup()
+    end}
 
 end,
 config = {