neovim
Generate colour schemes for Neovim.
Description
Neovim is a hyperextensible Vim-based text editor. The plugin generates a Lua colour scheme file that can be used directly with Neovim's built-in colour scheme system.
Output path
~/.config/nvim/colors/tinct.lua
Usage
tinct generate -i image -p ~/wallpaper.jpg -o neovim
With custom theme name
tinct generate -i image -p ~/wallpaper.jpg -o neovim --neovim.theme-name=my-theme
This generates ~/.config/nvim/colors/my-theme.lua.
Flags
| Flag | Default | Description |
|---|---|---|
--neovim.output-dir | ~/.config/nvim/colors | Output directory for colour scheme |
--neovim.theme-name | tinct | Theme name (used in filename) |
Configuration
After generation, activate the theme in Neovim.
init.lua
vim.cmd('colorscheme tinct')
init.vim
colorscheme tinct
Auto-reload
The generated colour scheme includes a file system watcher that automatically reloads colours when tinct updates the theme. This provides live theme updates without restarting Neovim.
Themed elements
The colour scheme affects:
- Editor background and foreground
- Syntax highlighting groups
- Line numbers and sign column
- Status line
- Popup menus
- Diff highlighting
- Search highlighting
- Visual selection
- Error and warning messages
Generated format
-- Neovim colorscheme generated by tinct
vim.cmd('hi clear')
if vim.fn.exists('syntax_on') then
vim.cmd('syntax reset')
end
vim.o.background = 'dark'
vim.g.colors_name = 'tinct'
-- Highlight groups
local highlights = {
Normal = { fg = '#cdd6f4', bg = '#1e1e2e' },
Comment = { fg = '#6c7086', italic = true },
String = { fg = '#a6e3a1' },
Function = { fg = '#89b4fa' },
Keyword = { fg = '#f5c2e7' },
-- ... additional groups
}
for group, opts in pairs(highlights) do
vim.api.nvim_set_hl(0, group, opts)
end