Yagua / nebulous.nvim

Minimalist Collection of Colorschemes for Neovim Written in Lua
MIT License
184 stars 11 forks source link
colorscheme dark dark-theme lua neovim nvim theme tree-sitter vim

Nebulous.nvim

Nebulous

Minimalist Collection of Colorschemes Written in Lua

Features

Prequisites

Preview

Screenshots #### Fullmoon ![fullmoon](./media/fullmoon.gif) #### Midnight ![midnight](./media/midnight.gif) #### Nova ![twilight](./media/nova.gif) #### Twilight ![twilight](./media/twilight.gif) #### Night ![night](./media/night.gif) #### Quasar ![quasar](./media/quasar.gif)

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

Option Default Value Description
variant night Select color variant
disable.background false Enable/Disable background in the editor
disable.endOfBuffer false Enable/Disable lines at the end of the buffer
disable.terminal_colors false Enable/Disable terminal colors
italic.comments false Enable/Disable "italic" style in comments
italic.functions false Enable/Disable "italic" style in functions
italic.variables false Enable/Disable "italic" style in variables
italic.keywords false Enable/Disable "italic" style in keywords
custom_colors {} Set custom colors for editor and plugin groups

Color variants

Variant Value
night default
twilight alternative
midnight alternative
fullmoon alternative
nova alternative
quasar alternative

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

Option Description
toggle_variant Browse among the different variants
random_variant Set a random variant among the different variants
set_variant Set a specific variant according to its name
get_colors Get 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!