README.md

November 23, 2021 ยท View on GitHub

Xresources-nvim

* Neovim colorscheme based on your xresources color *



Require

  • Neovim 0.5
  • xrdb

Install

Vim Plug

Plug 'nekonako/xresources-nvim'

Usage

  • lua

require('xresources')

  • lua inside vimscript

lua require('xresources')

  • vimscript

colorscheme xresources

Notes

if you use light background, set neovim background to light.

  • lua

vim.o.background = 'light'

  • lua inside vimscript

lua vim.o.background = 'light'

  • vimscript

set background=light

Properties

PropertiesXresources
fgforeground
bgbackground
blackcolor0
redcolor1
greencolor2
yellowcolor3
bluecolor4
purplecolor5
cyancolor6
whitecolor7
light_blackcolor8
light_redcolor9
light_greencolor10
light_yellowcolor11
light_bluecolor12
light_purplecolor13
light_cyancolor14
light_whitecolor15
greybackground + 0xf0f10
grey1background + 0x363940
noneNONE

Example using properties

Let say i want using xresources to my galaxyline configuration

local galaxyline = require('galaxyline')
local color = require('xresources')
local section = galaxyline.section

section.left[1] = {
   FileName = {
      provider = get_current_file_name,
      condition = buffer_not_empty,
      -- acessing properties --
      highlight = {color.bg, color.purple},
      separator = " ",
      -- acessing properties --
      separator_highlight = {color.gray, color.gray}
   }
}

Tips

Similiar project

My setup

  • my xresources color is originaly from uwu.vim
  • my terminal is using alacritty
  • font is pragmataPro

Thanks