From e7a913421ad546e56e7fd2cb3ce9a4f88c6c7c26 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 15 Mar 2024 00:50:58 +0100 Subject: [PATCH] Change theme to onedark --- modules/home-manager/cli/neovim/default.nix | 6 +-- .../home-manager/cli/neovim/files/lualine.lua | 2 +- .../home-manager/cli/neovim/files/theme.lua | 40 +++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 modules/home-manager/cli/neovim/files/theme.lua diff --git a/modules/home-manager/cli/neovim/default.nix b/modules/home-manager/cli/neovim/default.nix index 8a171fd..2c8c133 100644 --- a/modules/home-manager/cli/neovim/default.nix +++ b/modules/home-manager/cli/neovim/default.nix @@ -50,11 +50,9 @@ in ''; } { - plugin = base16-nvim; + plugin = onedark-nvim; type = "lua"; - config = '' - vim.cmd.colorscheme 'base16-default-dark' - ''; + config = (builtins.readFile ./files/theme.lua); } { plugin = nvim-cmp; diff --git a/modules/home-manager/cli/neovim/files/lualine.lua b/modules/home-manager/cli/neovim/files/lualine.lua index 8d7fe8a..5e90e9c 100644 --- a/modules/home-manager/cli/neovim/files/lualine.lua +++ b/modules/home-manager/cli/neovim/files/lualine.lua @@ -1,7 +1,7 @@ require('lualine').setup { options = { icons_enabled = true, - theme = 'base16', + theme = 'onedark', component_separators = { left = '|', right = '|'}, section_separators = { left = "", right = ""}, disabled_filetypes = {}, diff --git a/modules/home-manager/cli/neovim/files/theme.lua b/modules/home-manager/cli/neovim/files/theme.lua new file mode 100644 index 0000000..ae89729 --- /dev/null +++ b/modules/home-manager/cli/neovim/files/theme.lua @@ -0,0 +1,40 @@ +require('onedark').setup { + -- Main options -- + style = 'darker', + transparent = false, -- Show/hide background + term_colors = true, -- Change terminal color as per the selected theme style + ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden + cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu + + -- toggle theme style --- + toggle_style_key = 'ts', + toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, + + -- Change code style --- + -- Options are italic, bold, underline, none + -- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold' + code_style = { + comments = 'italic', + keywords = 'none', + functions = 'none', + strings = 'none', + variables = 'none' + }, + + -- Lualine options -- + lualine = { + transparent = false, -- lualine center bar transparency + }, + + -- Custom Highlights -- + colors = {}, -- Override default colors + highlights = {}, -- Override highlight groups + + -- Plugins Config -- + diagnostics = { + darker = true, -- darker colors for diagnostic + undercurl = false, -- use undercurl instead of underline for diagnostics + background = true, -- use background color for virtual text + }, +} +require('onedark').load()