diff options
| author | Ellison <ellisonleao@gmail.com> | 2023-09-30 19:34:57 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-30 19:34:57 -0300 |
| commit | 59c3dc89f8a373c11bb62a15a040122b9b6355f7 (patch) | |
| tree | 6c6aab6182c4f94c895404f787ba2e03168a4208 /README.md | |
| parent | e810b46367a89e8b733cd100d12a6c8b2fc022c3 (diff) | |
| parent | d3b86c23e0fbbcd338900241ca55f3cef1da6111 (diff) | |
| download | gruvbox-59c3dc89f8a373c11bb62a15a040122b9b6355f7.tar.gz gruvbox-59c3dc89f8a373c11bb62a15a040122b9b6355f7.tar.xz | |
Merge pull request #280 from ellisonleao/single-module
BREAKING CHANGE: gruvbox is now a single module
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -6,7 +6,7 @@ <a href="#"><img alt="Made with Lua" src="https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua" style="vertical-align:center" /></a> </p> -A port of [gruvbox community](https://github.com/gruvbox-community/gruvbox) theme to lua with [treesitter](https://github.com/nvim-treesitter/nvim-treesitter) support! +A port of [gruvbox community](https://github.com/gruvbox-community/gruvbox) theme to lua with [treesitter](https://github.com/nvim-treesitter/nvim-treesitter) and [semantic highlights](https://neovim.io/doc/user/lsp.html#lsp-semantic-highlight) support! <p align="center"> <img src="https://i.postimg.cc/fy3tnGFt/gruvbox-themes.png" /> @@ -18,16 +18,16 @@ Neovim 0.8.0+ # Installing -Using `packer` +## Using `packer` ```lua use { "ellisonleao/gruvbox.nvim" } ``` -Using `lazy.nvim` +## Using `lazy.nvim` ```lua -{ "ellisonleao/gruvbox.nvim", priority = 1000 } +{ "ellisonleao/gruvbox.nvim", priority = 1000 , setup = true, opts = ...} ``` # Basic Usage @@ -51,7 +51,6 @@ vim.cmd([[colorscheme gruvbox]]) Additional settings for gruvbox are: ```lua --- setup must be called before loading the colorscheme -- Default options: require("gruvbox").setup({ terminal_colors = true, -- add neovim terminal colors @@ -80,6 +79,8 @@ require("gruvbox").setup({ vim.cmd("colorscheme gruvbox") ``` +**VERY IMPORTANT**: Make sure to call setup() **BEFORE** calling the colorscheme command, to use your custom configs + ## Overriding ### Palette @@ -95,8 +96,6 @@ require("gruvbox").setup({ vim.cmd("colorscheme gruvbox") ``` -More colors in the [palette.lua](lua/gruvbox/palette.lua) file - ### 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 @@ -111,6 +110,18 @@ require("gruvbox").setup({ vim.cmd("colorscheme gruvbox") ``` +It also works with treesitter groups and lsp semantic highlight tokens + +```lua +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 @@ -118,4 +129,4 @@ Please note that the override values must follow the attributes from the highlig - **bold** - true or false for bold font - **italic** - true or false for italic font -Other values can be seen in `:h synIDattr` +Other values can be seen in [`synIDattr`](<https://neovim.io/doc/user/builtin.html#synIDattr()>) |
