Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get gruvbox high contrast working? #302

Open
samarthkulshrestha opened this issue Apr 26, 2021 · 8 comments
Open

How do I get gruvbox high contrast working? #302

samarthkulshrestha opened this issue Apr 26, 2021 · 8 comments

Comments

@samarthkulshrestha
Copy link

@samarthkulshrestha samarthkulshrestha commented Apr 26, 2021

Hey Chris!

Great work with LunarVim. I'm enjoying it so far.
Just the one thing: How do I get Gruvbox high contrast working?

I tried putting vim.cmd('let g:gruvbox_contrast_dark="hard"') in colorscheme.lua but it didn't work.

Tried abandoning the whole colorscheme approach (it's great for new users but I know what I want) and just installing gruvbox and here's my lua/gruvbox/init.lua which I source in the init file instead of colorscheme.lua:

vim.cmd('let g:nvcode_termcolors=256')

vim.cmd('colorscheme gruvbox')
vim.cmd('let g:gruvbox_contrast_dark="hard"')
vim.cmd('set background=dark')

Still doesn't work. I had NeoVim 0.4.4 before installing LunarVim, and it worked there. Could also be just nvim since I had to install the nightly version to get LunarVim working.

Anyways,
Amazing work. Keep it up.

@rebuilt
Copy link
Contributor

@rebuilt rebuilt commented Apr 26, 2021

Is the regular version of gruvbox working?

If not, did you add the plugin to plugins.lua ? Then :PackerCompile, :PackerInstall

Lunarvim does not change your version of neovim. It's just a set of configuration files for neovim. You probably still have 0.4 installed. This means you won't be able to take advantage of the language server functionality until you install 0.5

@samarthkulshrestha
Copy link
Author

@samarthkulshrestha samarthkulshrestha commented Apr 26, 2021

No, actually when I had to install LunarVim, I uninstalled 0.4 and installed 0.5, ofc. And yes the reqular gruvbox is working.

@rebuilt
Copy link
Contributor

@rebuilt rebuilt commented Apr 26, 2021

What's the output of

:lua print(vim.g.gruvbox_contrast_dark)

also try the lua format instead of vim commands

vim.g.gruvbox_contrast_dark="hard"
@samarthkulshrestha
Copy link
Author

@samarthkulshrestha samarthkulshrestha commented Apr 26, 2021

What's the output of

:lua print(vim.g.gruvbox_contrast_dark)

The output is hard

also try the lua format instead of vim commands

vim.g.gruvbox_contrast_dark="hard"

Same result. It doesn't seem to change anything.

@rebuilt
Copy link
Contributor

@rebuilt rebuilt commented Apr 26, 2021

It sounds like some other setting might be conflicting or interacting poorly with gruvbox.
All sorts of things can go wrong: https://github.com/morhetz/gruvbox/wiki/Terminal-specific

Try and see if picking it like this changes the colors.

:lua require'telescope.builtin'.colorscheme{}
@rebuilt
Copy link
Contributor

@rebuilt rebuilt commented Apr 26, 2021

If I were in your shoes, I'd start by commenting out unneeded files and settings so you only have gruvbox settings enabled and make sure you can make it work like that. Then start re-enabling sections to see what conflicts. Binary search commenting out code.

@samarthkulshrestha
Copy link
Author

@samarthkulshrestha samarthkulshrestha commented Apr 26, 2021

It sounds like some other setting might be conflicting or interacting poorly with gruvbox.
All sorts of things can go wrong: https://github.com/morhetz/gruvbox/wiki/Terminal-specific

It doesn't seem to be something terminal-specific, because vim (not neovim) does in fact display the high contrast colorscheme properly. And ofc I use the same terminal.

Try and see if picking it like this changes the colors.

:lua require'telescope.builtin'.colorscheme{}

This doesn't work either.

@samarthkulshrestha
Copy link
Author

@samarthkulshrestha samarthkulshrestha commented Apr 26, 2021

If I were in your shoes, I'd start by commenting out unneeded files and settings so you only have gruvbox settings enabled and make sure you can make it work like that. Then start re-enabling sections to see what conflicts. Binary search commenting out code.

Okay. I'll try that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants