GithubHelp home page GithubHelp logo

bsedin / gruvbox.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ellisonleao/gruvbox.nvim

0.0 0.0 0.0 342 KB

Lua port of the most famous vim colorscheme

License: MIT License

Lua 99.62% Makefile 0.38%

gruvbox.nvim's Introduction


gruvbox.nvim

Twitter Follow Made with Lua

A port of gruvbox community theme to lua with treesitter and semantic highlights support!

Prerequisites

Neovim 0.8.0+

Installing

Using packer

use { "ellisonleao/gruvbox.nvim" }

Using lazy.nvim

{ "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...}

Using vim-plug

Plug 'ellisonleao/gruvbox.nvim'

Basic Usage

Inside init.vim

set background=dark " or light if you want light mode
colorscheme gruvbox

Inside init.lua

vim.o.background = "dark" -- or "light" for light mode
vim.cmd([[colorscheme gruvbox]])

Configuration

Additional settings for gruvbox are:

-- Default options:
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, -- invert background for search, diffs, statuslines and errors
  contrast = "", -- can be "hard", "soft" or empty string
  palette_overrides = {},
  overrides = {},
  dim_inactive = false,
  transparent_mode = false,
})
vim.cmd("colorscheme gruvbox")

VERY IMPORTANT: Make sure to call setup() BEFORE calling the colorscheme command, to use your custom configs

Overriding

Palette

You can specify your own palette colors. For example:

require("gruvbox").setup({
    palette_overrides = {
        bright_green = "#990000",
    }
})
vim.cmd("colorscheme gruvbox")

Highlight groups

If you don't enjoy the current color for a specific highlight group, now you can just override it in the setup. For example:

require("gruvbox").setup({
    overrides = {
        SignColumn = {bg = "#ff9900"}
    }
})
vim.cmd("colorscheme gruvbox")

It also works with treesitter groups and lsp semantic highlight tokens

require("gruvbox").setup({
    overrides = {
        ["@lsp.type.method"] = { bg = "#ff9900" },
        ["@comment.lua"] = { bg = "#000000" },
    }
})
vim.cmd("colorscheme gruvbox")

Please note that the override values must follow the attributes from the highlight group map, such as:

  • fg - foreground color
  • bg - background color
  • bold - true or false for bold font
  • italic - true or false for italic font

Other values can be seen in synIDattr

gruvbox.nvim's People

Contributors

alex-w-k avatar bakageddy avatar bsedin avatar cryptomilk avatar defman21 avatar diaoul avatar eeexun avatar ellisonleao avatar eriedaberrie avatar foxyseta avatar frrenzy avatar github-actions[bot] avatar lucastavaresa avatar m3at avatar mezdelex avatar mikesmithgh avatar mxdevmanuel avatar ouuan avatar saccarosium avatar seniormars avatar shellcode33 avatar sqve avatar stvhuang avatar symphorien avatar thallada avatar vihu avatar wuerfeldev avatar xeluxee avatar xenrox avatar xntebli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.