瀏覽代碼

nixpkgs/neovim: switch theme to sonokai

Thomas Dy 3 年之前
父節點
當前提交
fc2c58df08
共有 3 個文件被更改,包括 21 次插入16 次删除
  1. 1 1
      .config/nixpkgs/neovim/flake.nix
  2. 0 15
      .config/nixpkgs/neovim/init.lua
  3. 20 0
      .config/nixpkgs/neovim/vimrc

+ 1 - 1
.config/nixpkgs/neovim/flake.nix

@@ -45,7 +45,7 @@
               telescope-fzf-native-nvim
               mini-nvim
               gitsigns-nvim
-              onedark-nvim
+              sonokai
 
               (nvim-treesitter.withPlugins (p: with p; [
                 tree-sitter-css

+ 0 - 15
.config/nixpkgs/neovim/init.lua

@@ -15,21 +15,6 @@ require('telescope').setup({
 })
 require('telescope').load_extension('fzf')
 
-require('onedark').setup({
-  term_colors = false,
-  transparent = true,
-  highlights = {
-    MiniStatuslineModeNormal = { bg = '$blue', fg = '$black' },
-    MiniStatuslineModeCommand = { bg = '$grey', fg = '$black' },
-    MiniStatuslineModeInsert = { bg = '$green', fg = '$black' },
-    MiniStatuslineModeVisual = { bg = '$orange', fg = '$black' },
-    MiniStatuslineModeReplace = { bg = '$red', fg = '$black' },
-    MiniStatuslineModeOther = { bg = '$green', fg = '$black' },
-    MiniIndentscopeSymbol = { fg = '$bg3' },
-  },
-})
-require('onedark').load()
-
 require('gitsigns').setup()
 
 require('mini.statusline').setup({

+ 20 - 0
.config/nixpkgs/neovim/vimrc

@@ -104,3 +104,23 @@ augroup formatting
   autocmd BufWritePre * :%s/\s\+$//e
   autocmd FileType markdown :set tw=80
 augroup end
+
+if has('termguicolors')
+  set termguicolors
+endif
+
+let g:sonokai_transparent_background=1
+
+colorscheme sonokai
+
+highlight link MiniIndentscopeSymbol Whitespace
+
+let s:configuration = sonokai#get_configuration()
+let s:palette = sonokai#get_palette(s:configuration.style)
+
+call sonokai#highlight('MiniStatuslineModeNormal', s:palette.black, s:palette.blue)
+call sonokai#highlight('MiniStatuslineModeCommand', s:palette.black, s:palette.yellow)
+call sonokai#highlight('MiniStatuslineModeInsert', s:palette.black, s:palette.green)
+call sonokai#highlight('MiniStatuslineModeVisual', s:palette.black, s:palette.orange)
+call sonokai#highlight('MiniStatuslineModeReplace', s:palette.black, s:palette.red)
+call sonokai#highlight('MiniStatuslineModeOther', s:palette.black, s:palette.green)