Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added lua configuration options to README.md for Neovim users. #77

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ Use your favorite plugin manager.
1. Add `Plug 'junegunn/seoul256.vim'` to .vimrc
2. Run `:PlugInstall`

- [packer.nvim](https://github.com/wbthomason/packer.nvim)
1. Add `use 'junegunn/seoul256.vim'` to ~/.config/nvim/init.lua
2. Run `:PackerInstall`


Color schemes
-------------

#### VimL
```vim
" Unified color scheme (default: dark)
colo seoul256
Expand All @@ -43,11 +49,26 @@ set background=dark
set background=light
```

#### Lua
```lua
-- Unified color scheme (default: dark)
vim.cmd[[colorscheme seoul256]]

-- Light color scheme
vim.cmd[[colorscheme seoul256-light]]

-- Switch
vim.g.background = dark
vim.g.background = light
```

Change background color
-----------------------

![seoul256-bg](https://raw.github.com/junegunn/i/master/seoul256-bg.png)


#### VimL
```vim
" seoul256 (dark):
" Range: 233 (darkest) ~ 239 (lightest)
Expand All @@ -62,13 +83,30 @@ let g:seoul256_background = 256
colo seoul256
```


#### Lua
```lua
-- seoul256 (dark):
-- Range: 233 (darkest) ~ 239 (lightest)
-- Default: 237
vim.g.seoul256_background = 236
vim.cmd[[colorscheme seoul256]]

-- seoul256 (light):
-- Range: 252 (darkest) ~ 256 (lightest)
-- Default: 253
vim.g.seoul256_background = 256
vim.cmd[[colorscheme seoul256]]
```

If `g:seoul256_background` is set, seoul256 will choose the right version based
on the value and `set background=dark/light` will not switch versions.

If you'd like to switch versions with custom background colors, set
`g:seoul256_background` to be a dark value, and additionally define
`g:seoul256_light_background` for seoul256-light.

#### VimL
```vim
let g:seoul256_background = 233
let g:seoul256_light_background = 256
Expand All @@ -77,6 +115,14 @@ colo seoul256
colo seoul256-light
```

#### Lua
```lua
vim.g.seoul256_background = 233
vim.g.seoul256_light_background = 256
vim.cmd[[colorscheme seoul256]]
vim.cmd[[colorscheme seoul256-light]]
```

Alternate 256-xterm -> sRGB mapping
-------------------------------------

Expand All @@ -93,10 +139,16 @@ If `let g:seoul256_srgb` is set to 1, the color mapping is altered
to suit the way urxvt (and various other terminals) renders them. That way, the
colors of the terminal and GUI versions are uniformly colored on Linux.

#### VimL
```vim
let g:seoul256_srgb = 1
```

#### Lua
```lua
vim.g.seoul256_srgb = 1
```

Current background color
------------------------

Expand Down