Home

Awesome

Nebulous.nvim

Nebulous

Minimalist Collection of Colorschemes Written in Lua

Features

Prequisites

Preview

<details> <summary>Screenshots</summary>

Fullmoon

fullmoon

Midnight

midnight

Nova

twilight

Twilight

twilight

Night

night

Quasar

quasar

</details>

Installation

You can install colorsecheme with any package manager, for example:

Packer.nvim
use 'Yagua/nebulous.nvim'
Vim Plug
Plug 'Yagua/nebulous.nvim'

Configuration & Use

Setup example:

--Put this lines inside your vimrc to set the colorscheme
require("nebulous").setup {
  variant = "midnight",
  disable = {
    background = true,
    endOfBuffer = false,
    terminal_colors = false,
  },
  italic = {
    comments   = false,
    keywords   = true,
    functions  = false,
    variables  = true,
  },
  custom_colors = { -- this table can hold any group of colors with their respective values
    LineNr = { fg = "#5BBBDA", bg = "NONE", style = "NONE" },
    CursorLineNr = { fg = "#E1CD6C", bg = "NONE", style = "NONE" },

    -- it is possible to specify only the element to be changed
    TelescopePreviewBorder = { fg = "#A13413" },
    LspDiagnosticsDefaultError = { bg = "#E11313" },
    TSTagDelimiter = { style = "bold,italic" },
  }

When overwriting the color groups of the selected variant, it is possible to obtain their colors or those of another variant as follows:

local colors = require("nebulous.functions").get_colors("midnight") -- < variant name
-- if you want to get the colors of the current variant use the function without arguments

require("nebulous").setup {
  ...
  custom_colors = {
    Normal = { fg = colors.Red, bg = colors.Black, style = colors.none },
  },
}
-- the '...' is used to denote the existence of other settings, this is not language syntax.

Summary of options

OptionDefault ValueDescription
variantnightSelect color variant
<b>disable</b>.backgroundfalseEnable/Disable background in the editor
<b>disable</b>.endOfBufferfalseEnable/Disable lines at the end of the buffer
<b>disable</b>.terminal_colorsfalseEnable/Disable terminal colors
<b>italic</b>.commentsfalseEnable/Disable "italic" style in comments
<b>italic</b>.functionsfalseEnable/Disable "italic" style in functions
<b>italic</b>.variablesfalseEnable/Disable "italic" style in variables
<b>italic</b>.keywordsfalseEnable/Disable "italic" style in keywords
custom_colors{}Set custom colors for editor and plugin groups

Color variants

VariantValue
nightdefault
twilightalternative
midnightalternative
fullmoonalternative
novaalternative
quasaralternative

Lualine scheme

If you want to use the custom colorscheme of lualine, put the following code in your init (make sure you have nebulous and lualine installed):

require('lualine').setup {
  options = {
    -- theme name
    theme = 'nebulous'
  }
}

Functions

OptionDescription
toggle_variantBrowse among the different variants
random_variantSet a random variant among the different variants
set_variantSet a specific variant according to its name
get_colorsGet the colors of the current variant or the variant specified as argument
Toggle variant

toggle

To switch between styles just run the function, e.g:

:lua require("nebulous.functions").toggle_variant()

The random function has a similar behavior, just call the function as well:

:lua require("nebulous.functions").random_variant()

You can also set a specific variant based on its name:

:lua require("nebulous.functions").set_variant("variant_name")

The functions can be mapped for quick use, e.g:

nnoremap <silent><leader>tc :lua require("nebulous.functions").toggle_variant()<CR>
nnoremap <silent><leader>rc :lua require("nebulous.functions").random_variant()<CR>
nnoremap <silent><leader>tw :lua require("nebulous.functions").set_variant("variant_name")<CR>
local setmap = vim.api.nvim_set_keymap
local options = { silent = true, noremap = true }

setmap("n", "<leader>tc", ":lua require('nebulous.functions').toggle_variant()<CR>", options)
setmap("n", "<leader>rc", ":lua require('nebulous.functions').random_variant()<CR>", options)
setmap("n", "<leader>tw", ":lua require('nebulous.functions').set_variant('variant_name')<CR>", options)

More features and color variants are coming in future updates!

NOTE

I hope you enjoy these color schemes!