An open API service indexing awesome lists of open source software.

https://github.com/tx3stn/nightjungle.nvim

A dark and green Neovim colorscheme with pops of color.
https://github.com/tx3stn/nightjungle.nvim

color-scheme colorscheme dark-mode green neovim

Last synced: 3 months ago
JSON representation

A dark and green Neovim colorscheme with pops of color.

Awesome Lists containing this project

README

          

nightjungle.nvim


nightjungle.nvim logo


Dark & green with pops of color

![Go - syntax highlighting preview](https://github.com/user-attachments/assets/b9eff7fc-4edc-4c3f-8cfe-63a3f0969ed9)

TypeScript screenshot (click to expand)

![TypeScript - syntax highlighting preview](https://github.com/user-attachments/assets/ddefacb5-20e1-418b-8f66-c5fa47eac7d1)

View more files in `./examples`.

## Overview

`nightjungle.nvim` is a Neovim colorscheme with lots of green, dark backgrounds and pops of color.

Very much inspired by my use of [OneDarkPro](https://github.com/olimorris/onedarkpro.nvim) for
many years with some overridden base colors.

## Installation

### lazy.nvim

```lua
{
"tx3stn/nightjungle.nvim",
lazy = false,
priority = 1000,
config = function()
require("nightjungle").setup()
vim.cmd.colorscheme("nightjungle")
end,
}
```

## Configuration

`setup()` accepts a single options table that allows you to enable/disable highlights for
specific filetypes or plugins. Example:

```lua
require("nightjungle").setup({
caching = true,
palette = {
["bg.default"] = "#0A1014",
["green.base"] = "#0A7A62",
},
highlights = {
Comment = { fg = "fg.muted", italic = true },
CursorLine = { bg = "bg.focus" },
},
plugins = {
gitsigns = true,
telescope = true,
snacks = true,
markview = true,
},
filetypes = {
markdown = true,
lua = true,
typescript = true,
},
options = {
transparency = false,
},
styles = {
comments = { italic = true },
keywords = { italic = true },
functions = { bold = true },
strings = {},
},
})
```

### Key Options

- `caching` (`boolean`): Enables compiled cache loading.
- `cache_path` (`string`): Directory path for generated cache files.
- `cache_suffix` (`string`): Suffix appended to compiled cache file names.
- `debug` (`boolean`): Enables debug cache generation.
- `palette` (`table`): Override existing palette tokens.
- `highlights` (`table`): Add or override highlight groups.
- `styles` (`table`): Apply style flags to common syntax targets (`comments`, `keywords`, `functions`, `strings`).
- `plugins` (`table`): Enable/disable plugin highlight modules (leave empty to enable all defaults).
- `filetypes` (`table`): Enable/disable filetype highlight modules (leave empty to enable all defaults).
- `options.transparency` (`boolean`): Use a transparent background.

Disable all plugin/filetype modules and opt into a small set:

```lua
require("nightjungle").setup({
plugins = {
all = false,
gitsigns = true,
telescope = true,
},
filetypes = {
all = false,
lua = true,
markdown = true,
},
})
```

### Overriding Highlights

Color values can be used directly in highlight definitions:

```lua
highlights = {
NormalFloat = { fg = "fg.default", bg = "bg.dark" },
DiagnosticUnderlineError = { sp = "diagnostic.error", undercurl = true },
GitSignsAdd = { fg = "git.add" },
WinSeparator = { link = "FloatBorder" },
}
```

## Commands

`nightjungle.nvim` registers the following commands on load:

- `:NightJungleBGToggle` / `require("nightjungle").toggle_background()` - toggles `options.transparency`, recompiles cache, and reloads the colorscheme.
- `:NightjungleColors` / `require("nightjungle").open_colors()` - opens a scratch buffer listing active palette tokens and values.
- `:NightjungleCache` / `require("nightjungle").cache()` - compiles and writes cache artifacts.
- `:NightjungleCacheClear` / `require("nightjungle").clean()` - clears cache artifacts.

## Cache Artifacts

With default settings, cache files are written under:

`~/.cache/nvim/nightjungle`

## Development

This repo contains a `.lazy.lua` file which will load the colorscheme and reload
on changes so you can see how your changes work.

`./examples/` contains a number of example files of different languages to preview
the color scheme.

> [!NOTE]
> You may need to clear the cache after making your changes with `:NightjungleCacheClear`

Loading just the color scheme:

```bash
nvim --clean -u NONE \
-c "set rtp+=/absolute/path/to/nightjungle.nvim" \
-c "colorscheme nightjungle"
```

## References

- [OneDarkPro](https://github.com/olimorris/onedarkpro.nvim) - an outstanding Neovim color scheme
project and a major inspiration (by which I mean source I copied directly from) for structure,
caching ideas, and extensible highlight organization.