luisiacc / gruvbox-baby Goto Github PK
View Code? Open in Web Editor NEWGruvbox theme for neovim with full 🎄TreeSitter support.
License: MIT License
Gruvbox theme for neovim with full 🎄TreeSitter support.
License: MIT License
Hi there, first of all thanks for making this colorscheme!
I had problem reading the search result when the original text is in foreground color.
After some digging I think it's due to the combination of
if config.transparent_mode then
local transparent = {
background = colors.none,
background_dark = colors.none,
}
colors = vim.tbl_extend("force", colors, transparent)
end
and
Search = { fg = c.background, bg = c.foreground }
I temporarily fixed it by setting the bg to medium_gray
in my config.
Search = { fg = c.background, bg = c.medium_gray }
I see there is already a block handling transparent mode configurations
if config.transparent_mode then
theme.base = vim.tbl_extend("force", theme.base, {
Visual = { bg = c.medium_gray },
MultiCursor = { bg = c.medium_gray },
Cursor = { bg = c.soft_green, c.dark }
})
end
Maybe Search
should also be added there
Hey! Thank you for the theme! it looks amazing!
I was going to ask if there are any plans to support the light variant of the theme? me myself using the light theme most of the time as it is easier for my eyes to read the dark text on a light background.
I want to start working on adding support for the light theme too, but I would need some help or guidance 😄
Thank you again!
So the objective here is to highlight the not-highlighted stuff here:
As you can see in this screenshot, the 'field' I'm trying to highlight is plain_value
, which I would like to know how to highlight. This is kind of a generic treesitter question, but we could improve this plugin's css treesitter highlighting with this as well.
After the last update the transparent mode stopped working on nvim-tree panel. Here is an screenshot
Aditional info:
Issue
Expectation (it seems to be fine after some text)
Note: This problem is on Ubuntu terminal and Mac (iterm 2) seems to be fine.
Suggestion;
I'm using CoC.nvim, CursorHold (which highlights the symbol and references) and visually highlighted text share very similar (if not same) highlight group so it's hard to tell when I'm in visual mode.
I have changed it for myself but maybe this should be addressed in the colour scheme.
Overall, I'm loving this theme, I have been using gruvbox for over a year but it just didn't seem enough for Python, Lua and JS.
Thank you again.
To actually have treesitter support, this file is required.
I hereby request to support treesitter without this workaround.
I don't know this!!!!
Hi, I have the following setting, and my question is specifically about the override of comment
which I think should change the text color of comments to orange, but it did not change the color at all.
{
"luisiacc/gruvbox-baby",
branch = "main",
config = function()
local colors = require("gruvbox-baby.colors").config()
vim.o.termguicolors = true
vim.g.gruvbox_baby_background_color = "medium"
vim.g.gruvbox_baby_highlights = {
["@variable.builtin"] = { fg = colors.orange },
DiagnosticUnderlineError = { sp = "#ff0000", style = "undercurl" },
LineNr = { fg = "#DEDEDE" },
CursorLineNr = { fg = "#FFB81C" },
Comment = { fg = colors.orange },
}
vim.g.gruvbox_baby_transparent_mode = 1
end,
},
Hello, I dont use tabs often but I noticed that they look like this on my setup:
And it is clearly visible on gruvbox-material, if you thought it might be some other pluggin messing with this.
Can you please help me figure out what highlight should I change, and even better, change it by default? Thanks for suggestions!
Hi! I have not been able to find the way to change the intensity of the palette past the single default.
I'm happy for all the help I can get.
There seems to be no terminal support, a possible solution is as follows
-- neovim terminal mode colors
local function set_terminal_colors(colors)
vim.g.terminal_color_0 = colors.background_dark
vim.g.terminal_color_8 = colors.foreground
vim.g.terminal_color_1 = colors.error_red
vim.g.terminal_color_9 = colors.red
vim.g.terminal_color_2 = colors.forest_green
vim.g.terminal_color_10 = colors.soft_green
vim.g.terminal_color_3 = colors.soft_yellow
vim.g.terminal_color_11 = colors.bright_yellow
vim.g.terminal_color_4 = colors.dark_gray
vim.g.terminal_color_12 = colors.light_blue
vim.g.terminal_color_5 = colors.magenta
vim.g.terminal_color_13 = colors.pink
vim.g.terminal_color_6 = colors.forest_green
vim.g.terminal_color_14 = colors.blue_gray
vim.g.terminal_color_7 = colors.milk
vim.g.terminal_color_15 = colors.gray
end
In my config file (lazy) I had to temporarily handle it like this
-- Bring up coloring from the `gruvbox` theme, which is more complete for the terminal
local terminal_colors = {
"#282828", "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#ebdbb2",
"#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#a89984",
}
for k, v in ipairs(terminal_colors) do
vim.g['terminal_color_' .. (k - 1)] = v
end
Maybe there is another way but I don't know about it?
Disable telescope theme as default, enabling it via config of vim.g.gruvbox_baby_telescope_theme = 1
Hi,
Since 620c5bd I now get this on startup
Error executing vim.schedule lua callback: ...pack/packer/start/gruvbox-baby/lua/gruvbox-baby/util.lua:43: bad argument #1 to 'pairs
' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
...pack/packer/start/gruvbox-baby/lua/gruvbox-baby/util.lua:43: in function 'syntax'
...pack/packer/start/gruvbox-baby/lua/gruvbox-baby/util.lua:61: in function ''
vim.lua: in function ''
vim.lua: in function <vim.lua:0>
Reverting that commit makes it go away and works as expected.
Am I missing something in my configuration/setup?
Neovim supports semantic highlighting using Tree-sitter and LSP semantic tokens but function parameter declarations are not rendered consistently in the function body. I expected function parameters that are referenced in the function body to be rendered in the same color as they are rendered in their declarations but as the image below demonstrates, they are not. They are rendered as if they were declared in the function body (i.e. as variables)... at least in JavaScript and Typescript files.
Is there a config setting that I can use to address this?
My gruvbox-baby config:
let g:gruvbox_baby_function_style = "NONE"
let g:gruvbox_baby_keyword_style = "italic"
let g:gruvbox_baby_telescope_theme = 1
let g:gruvbox_baby_transparent_mode = 1
set background=dark
set termguicolors
colorscheme gruvbox-baby
Hi I use cursorcolumn from time to time and I couldnt see how to set its colour or make it so it was visible. For now I'm doing this:
❯ git --no-pager diff
diff --git a/lua/gruvbox-baby/theme.lua b/lua/gruvbox-baby/theme.lua
index 4823f2d..14c97e2 100644
--- a/lua/gruvbox-baby/theme.lua
+++ b/lua/gruvbox-baby/theme.lua
@@ -259,7 +259,7 @@ function M.setup(config)
ColorColumn = { bg = c.background_dark },
SignColumn = { bg = c.background },
- CursorColumn = { bg = c.background },
+ CursorColumn = { bg = c.bg_light },
How should I be overriding this?
btw love the colour scheme its awesome!
First row, last column ( repeated hex code )
It should be : #DEDEDE ( i suppose )
-- Mutt-Mail:
--
-- header and subject parts
mailHeader = { fg = c.blue_gray, bg = c.none },
mailHeaderKey = { fg = c.blue_gray, bg = c.none },
mailHeaderEmail = { fg = c.blue_gray, bg = c.none },
mailSubject = { fg = c.blue_gray, bg = c.none },
--quoted text in mails
mailQuoted1 = { fg = c.light_blue, bg = c.none },
mailQuoted2 = { fg = c.magenta, bg = c.none },
mailQuoted3 = { fg = c.soft_yellow, bg = c.none },
mailQuoted4 = { fg = c.soft_green, bg = c.none },
mailQuoted5 = { fg = c.red, bg = c.none },
mailQuoted6 = { fg = c.orange, bg = c.none },
--quoted text in mails
mailQuotedExp1 = { fg = c.light_blue, bg = c.none },
mailQuotedExp2 = { fg = c.magenta, bg = c.none },
mailQuotedExp3 = { fg = c.soft_yellow, bg = c.none },
mailQuotedExp4 = { fg = c.soft_green, bg = c.none },
mailQuotedExp5 = { fg = c.red, bg = c.none },
mailQuotedExp6 = { fg = c.orange, bg = c.none },
-- did not discover yet for what this is used: mailVerbatim
-- mail signature
mailSignature = { fg = c.foreground, bg = c.none },
-- mail url and emails
mailURL = { fg = c.blue_gray, bg = c.none },
mailEmail = { fg = c.blue_gray, bg = c.none },
Attempted configuration is:
gruvbox-baby/lua/gruvbox-baby/theme.lua
Line 208 in 309b405
Although I'm only able to configure the highlight via PreProc
:
PreProc = {fg = colors.forest_green}
(Just changed to some other color than orange
or soft_yellow
to detect what changes it)
Not sure if it's an upstream problem since it seems that https://github.com/vim-python/python-syntax links it under Define
, which could be a reason why it ends up under PreProc
(?) Ref: https://neovim.io/doc/user/syntax.html
Here's the line in vim-python/python-syntax
I'm referring to:
https://github.com/vim-python/python-syntax/blob/2cc00ba72929ea5f9456a26782db57fb4cc56a65/syntax/python.vim#L441
The color scheme appears to be severely broken when applied to the default terminal on Mac. It's not just a simple issue of color tones, but rather a complete collapse of the colors.
-- gruvbox-baby config & setting
local colors = require("gruvbox-baby.colors").config()
vim.g.gruvbox_baby_highlights = {Normal = {fg = colors.foreground}}
-- Enable telescope theme
vim.g.gruvbox_baby_telescope_theme = 1
-- Enable transparent mode
vim.g.gruvbox_baby_transparent_mode = 1
vim.cmd[[colorscheme gruvbox-baby]]
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.0/share/nvim"
I'm not sure if the problem is with the terminal, as the colors work correctly when using morhetz/gruvbox . But it doesn't fit treesitter.
I did some basic work,:help neo-tree-highlights
-- NeoTree
NeoTreeNormal = { fg = c.foreground, bg = c.background_dark },
NeoTreeNormalNC = { fg = c.foreground, bg = c.background_dark },
NeoTreeDirectoryIcon = { fg = c.soft_yellow },
NeoTreeRootName = { fg = c.magenta },
NeoTreeExecFile = { fg = c.light_blue, style = "NONE" },
NeoTreeGitUnstaged = { fg = c.red },
NeoTreeGitStaged = { fg = c.foreground },
NeoTreeGitModified = { fg = c.soft_yellow },
NeoTreeGitUnstracked = { fg = c.soft_green },
NeoTreeGitDeleted = { fg = c.red },
Just like the original gruvbox, can you add the option g:gruvbox_italicize_strings
to set italic style for string please?
I have no idea why but somehow the colors seem off when using this scheme. I am running nvim 0.6.1 on Debian under WSL2.0 on Windows Terminal.
I have tried to run nvim inside and outside of tmux, with set termguicolors
on and off, and it always looks the same. I don't have any issues with other colorschemes.
This colorscheme looks really nice and I'd like to get it to work. If someone has any ideas what to try that would be great.
I tried to use this theme with lunarvim but it returns an error:
Error detected while processing nvim_exec() called at /home/ctarx/.local/share/lunarvim/site/
pack/packer/start/gruvbox-baby/colors/gruvbox-baby.vim:7:
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
Nvim: v0.8.0-dev
This request is opinionated. It would be nice if the treesitter highlight groups @text.strong
and @text.emphasis
had styling so that "strong" text appears bold and "emphasis" text appears italic. I discovered this issue when learning neorg
. I wondered why the bold and italicized text wasn't appearing correctly.
My current workaround is to manually set the highlights. It would be nice to not have to do this though.
vim.g.gruvbox_baby_highlights = {
["@text.strong"] = {
fg = require('gruvbox-baby.colors').config(opts).soft_yellow,
style = "bold",
},
["@text.emphasis"] = {
fg = require('gruvbox-baby.colors').config(opts).soft_yellow,
style = "italic",
},
}
The fix would be to add style = "[bold|italic]"
to the necessary highlight groups in gruvbox-baby/lua/gruvbox-baby/theme.lua
. I can open a PR with the changes.
Please refer to the plugin RRethy/vim-illuminate.
It seems not working with illuminator.
He
Color support for Galaxyline would be awesome. I could also help with digging for highlight groups and I would sacrifice testing it of course ;-)
After looking the code, I found that the reason is that both of them work by set background
and background_dark
field, so if configured transparent_mode
, background_color
will not working.
So maybe background_color
feature work by config foreground
, and transparent_mode
feature work by config background
& background_dark
?
local background = config.background_color or colors.background
if intensity_map[background] then
colors = vim.tbl_extend("force", colors, intensity_map[background])
end
if config.transparent_mode then
local transparent = {
background = colors.none,
background_dark = colors.none,
}
colors = vim.tbl_extend("force", colors, transparent)
end
This is my config:
local g = vim.g
g.gruvbox_baby_background_color = "medium"
g.gruvbox_baby_function_style = "NONE"
g.gruvbox_baby_telescope_theme = 1
g.gruvbox_baby_transparent_mode = 1
vim.cmd([[colorscheme gruvbox-baby]])
Hi @luisiacc I'm really enjoying your theme.
I'm just experiencing one problem, the diffAdded and diffRemoved highlighting have a very dark foregroundColor which makes it unreadable.
As a workaround I have linked them to DiffAdd and DiffRemove (so it makes the background color green/red instead of the foreground) But you probably can come up with a better color scheme ;)
TelescopePromptNormal = { fg = milk, bg = c.medium_gray },
TelescopePromptTitle = { fg = milk, bg = c.soft_yellow },
Should reference c.milk
.
Hi,
After recent commit b505fe8 I getting error:
Error detected while processing nvim_exec() called at /Users/irmantas/.local/share/nvim/site/pack/packer/start/gruvbox-baby/colors/gruvbox-baby.vim:7:
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
W18: Invalid character in group name
Previous commit 4f1df4e works without any problem.
Currently on stable NeoVim version:
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]
👋🏻 First off, amazing job on this colourscheme. I love it.
Just one issue I have is that there are some tokens that have the same colours as other tokens, which doesn't happen with the original gruvbox theme.
Below are two screenshots that demonstrate this. Both are of the same window/buffer layout (lua file + go file) but just with the two colourschemes (gruvbox and gruvbox-baby) being used.
You'll notice in the lua file the augroup packer_use_config
has two separate colours with gruvbox, while they are the same red colour in gruvbox-baby.
Similarly, in the go file, you'll see on line 35 BeforeSend: func(event *sentry.Event
where func
and the word sentry
are the same red colour with gruvbox-baby where as with gruvbox they are unique colours.
Just wanted to flag this in case it was a mistake, or if intended, would it be possible to make these unique colours, as the heavy overlapping of 'red' can be a bit distracting for me.
Either way. Great theme!
Thanks 🙂
Colors for p00f/nvim-ts-rainbow can be supported with the rainbowcol[1-7]
highlight color groups: p00f/nvim-ts-rainbow#91
Is hl-columncolor
part of the theme? If yes I don't think it's being set in this repo.
Hi, I am using gruvbox-baby on neovim, and am having issues with the theme when using find/replace. As seen below, this is what the default neovim shows when using find and replace with confirmation (in this case the command was :%s/mm/deg/gc
).
The green highlight specifies what result is currently waiting for replace confirmation:
However with gruvbox-baby, the highlights are all the same color, making it impossible to tell which result is waiting for confirmation based on the highlighting.
Let me know if any other information is needed!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.