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 paths
~/.config/nvim/colors/tinct.lua
~/.config/nvim/lua/lualine/themes/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
Lualine
Tinct generates a standalone lualine.nvim theme file alongside the main colourscheme.
Automatic theming (no configuration needed)
If you use lualine with its default theme = 'auto' setting, lualine will automatically extract colours from tinct's highlight groups (Normal, String, Number, Special, Identifier, PmenuSel, StatusLine). No extra configuration is required.
Explicit theme
To use the dedicated tinct lualine theme, set it in your lualine configuration:
require('lualine').setup({
options = {
theme = 'tinct',
},
})
The generated theme file at ~/.config/nvim/lua/lualine/themes/tinct.lua provides colour definitions for all lualine modes (normal, insert, visual, replace, command, inactive) using the same palette as the main colourscheme.
If you use a custom --neovim.theme-name, use that name instead:
require('lualine').setup({
options = {
theme = 'my-theme',
},
})
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