Module thcon::app::vim [−][src]
Switches vim and Neovim colorschemes (and other arbitrary settings)
Usage: Windows
Windows is not yet supported, but vim
/nvim
under WSL should work just fine.
Usage: macOS & Linux
Install thcon.vim via your .vimrc
or init.vim
according to its README, adding both the relevant line for your plugin manager and call thcon#listen()
.
In your thcon.toml
, define light and dark themes. All values within ‘dark’ and ‘light’ are
optional (blank values cause no changes):
[vim]
light.colorscheme = "shine"
dark.colorscheme = "blue"
[vim.light]
colorscheme = "shine"
[vim.light.set]
background = "light"
[vim.dark]
colorscheme = "blue"
[vim.dark.set]
background = "dark"
or:
[neovim]
dark.colorscheme = "default"
dark.set.background = "dark"
dark.let."g:lightline" = { colorscheme = "ayu_dark" }
light.colorscheme = "shine"
light.set.background = "light"
light.let."g:lightline" = { colorscheme = "ayu_light" }
Feel free to use whichever syntax you prefer (or any other), as long as it’s valid TOML.
thcon.toml
Schema
Section: vim
or nvim
Key | Type | Description | Default |
---|---|---|---|
light | table | Settings to apply in light mode | (none) |
light.colorscheme | string | The colorscheme to apply in light mode | (none) |
light.set | table | Set of key/value pairs to apply with :set in light mode | (none) |
light.setglobal | table | Set of key/value pairs to apply with :setglobal in light mode | (none) |
light.let | table | Set of key/value pairs to apply with :let in light mode | (none) |
dark | table | Settings to apply in dark mode | (none) |
dark.colorscheme | string | The colorscheme to apply in dark mode | (none) |
dark.set | table | Set of key/value pairs to apply with :set in dark mode | (none) |
dark.setglobal | table | Set of key/value pairs to apply with :setglobal in dark mode | (none) |
dark.let | table | Set of key/value pairs to apply with :let in dark mode | (none) |
Structs
Config | |
ConfigSection | |
Neovim | |
Vim |