From e8acabee7811ee5c5db04b838c0a149866f53979 Mon Sep 17 00:00:00 2001 From: Donnerinoern <72634505+Donnerinoern@users.noreply.github.com> Date: Wed, 17 Jan 2024 21:08:36 +0100 Subject: [PATCH] Theme: Added Gruvbox --- docs/release-notes/rl-0.6.md | 4 +++ flake.lock | 17 +++++++++ flake.nix | 5 +++ lib/types/plugins.nix | 1 + .../statusline/lualine/supported_themes.nix | 1 + modules/theme/supported_themes.nix | 36 +++++++++++++++++++ 6 files changed, 64 insertions(+) diff --git a/docs/release-notes/rl-0.6.md b/docs/release-notes/rl-0.6.md index d48e1d0..8d74eec 100644 --- a/docs/release-notes/rl-0.6.md +++ b/docs/release-notes/rl-0.6.md @@ -21,3 +21,7 @@ Release notes for release 0.6 - Deprecated `presence.nvim` in favor of `neocord`. This means `vim.rich-presence.presence-nvim` is removed and will throw a warning if used. You are recommended to rewrite your neocord config from scratch based on the [official documentation](https://github.com/IogaMaster/neocord) + +[donnerinoern](https://github.com/donnerinoern): + +- Added Gruvbox theme diff --git a/flake.lock b/flake.lock index 41301c1..b088f51 100644 --- a/flake.lock +++ b/flake.lock @@ -533,6 +533,22 @@ "type": "github" } }, + "gruvbox": { + "flake": false, + "locked": { + "lastModified": 1704132908, + "narHash": "sha256-p/y65ub1qL+5g0ZiWzaTyQeiP7LtVfsdcdJ0eb0A7Og=", + "owner": "ellisonleao", + "repo": "gruvbox.nvim", + "rev": "4176b0b720db0c90ab4030e5c1b4893faf41fd51", + "type": "github" + }, + "original": { + "owner": "ellisonleao", + "repo": "gruvbox.nvim", + "type": "github" + } + }, "highlight-undo": { "flake": false, "locked": { @@ -1497,6 +1513,7 @@ "gesture-nvim": "gesture-nvim", "gitsigns-nvim": "gitsigns-nvim", "glow-nvim": "glow-nvim", + "gruvbox": "gruvbox", "highlight-undo": "highlight-undo", "hop-nvim": "hop-nvim", "icon-picker-nvim": "icon-picker-nvim", diff --git a/flake.nix b/flake.nix index 0e8d402..65bbe94 100644 --- a/flake.nix +++ b/flake.nix @@ -341,6 +341,11 @@ flake = false; }; + gruvbox = { + url = "github:ellisonleao/gruvbox.nvim"; + flake = false; + }; + # Rust crates crates-nvim = { url = "github:Saecki/crates.nvim"; diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index 2ea4ba7..2ca2a0d 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -43,6 +43,7 @@ with lib; let "catppuccin" "dracula" "oxocarbon" + "gruvbox" "minimap-vim" "dashboard-nvim" "alpha-nvim" diff --git a/modules/statusline/lualine/supported_themes.nix b/modules/statusline/lualine/supported_themes.nix index 0276998..b00fe82 100644 --- a/modules/statusline/lualine/supported_themes.nix +++ b/modules/statusline/lualine/supported_themes.nix @@ -3,4 +3,5 @@ "onedark" "catppuccin" "oxocarbon" + "gruvbox" ] diff --git a/modules/theme/supported_themes.nix b/modules/theme/supported_themes.nix index 05da3c4..056255a 100644 --- a/modules/theme/supported_themes.nix +++ b/modules/theme/supported_themes.nix @@ -92,4 +92,40 @@ ''; styles = ["dark" "light"]; }; + + gruvbox = { + setup = { + style ? "dark", + transparent ? false, + }: '' + -- Gruvbox theme + require("gruvbox").setup({ + terminal_colors = true, -- add neovim terminal colors + undercurl = true, + underline = true, + bold = true, + italic = { + strings = true, + emphasis = true, + comments = true, + operators = false, + folds = true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, + contrast = "", + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = ${lib.boolToString transparent}, + }) + vim.o.background = "${style}" + vim.cmd("colorscheme gruvbox") + ''; + styles = ["dark" "light"]; + }; }