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

KeyTypeDescriptionDefault
lighttableSettings to apply in light mode(none)
light.colorschemestringThe colorscheme to apply in light mode(none)
light.settableSet of key/value pairs to apply with :set in light mode(none)
light.setglobaltableSet of key/value pairs to apply with :setglobal in light mode(none)
light.lettableSet of key/value pairs to apply with :let in light mode(none)
darktableSettings to apply in dark mode(none)
dark.colorschemestringThe colorscheme to apply in dark mode(none)
dark.settableSet of key/value pairs to apply with :set in dark mode(none)
dark.setglobaltableSet of key/value pairs to apply with :setglobal in dark mode(none)
dark.lettableSet of key/value pairs to apply with :let in dark mode(none)

Structs

Config
ConfigSection
Neovim
Vim