Skip to main content
Version: 0.3.3

neovim

Generates a Lua colorscheme for Neovim, plus a matching lualine status-line theme. The colorscheme installs an in-process file watcher (vim.uv.new_fs_event) so any subsequent regeneration is picked up live — no manual :colorscheme re-run needed while a session has tinct selected.

Installation

Built into tinct — nothing to install separately. tinct generate -o neovim works out of the box.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o neovim

Generated files

FilePathRole
tinct.lua~/.config/nvim/colors/tinct.luaColorscheme. Standard Neovim colorscheme — vim.cmd('highlight clear'), palette definitions, ~150 highlight groups covering core syntax, LSP diagnostics, Treesitter, Telescope, NvimTree, Git signs, and terminal colours. Discovered automatically by :colorscheme tinct.
tinct.lua (lualine)~/.config/nvim/lua/lualine/themes/tinct.lualualine theme. Standalone lualine theme file. Found via nvim_get_runtime_file("lua/lualine/themes/tinct.lua") — works regardless of plugin load order.

The filenames track the --neovim.theme-name flag: passing --neovim.theme-name=foo produces colors/foo.lua and lua/lualine/themes/foo.lua.

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

Integration

Add the colorscheme to your init.lua:

vim.cmd('colorscheme tinct')

…or to your init.vim:

colorscheme tinct

For lualine, the default theme = 'auto' will already follow colorscheme. To pin lualine explicitly to the tinct theme:

require('lualine').setup({
options = { theme = 'tinct' },
})

Reload behaviour

Automatic

The generated colors/tinct.lua starts a vim.uv filesystem watcher on itself when sourced. Whenever tinct rewrites the file, the watcher detects the change, highlight clears, and re-sources the file in place — but only if the current session's vim.g.colors_name is still tinct. Other colorschemes are left untouched. The watcher is cleaned up on VimLeavePre.

This means there is no out-of-process reload (no signal, no IPC) — the colorscheme reloads itself from inside Neovim. From the plugin host's point of view, reload.method is none, but the user experience is live.

Manual fallback

If you set the colorscheme but the watcher hasn't installed itself (for example, you regenerated before ever running :colorscheme tinct):

:colorscheme tinct

For lualine, if it doesn't track the colour change:

:lua require('lualine').setup({ options = { theme = 'tinct' } })

Uninstall / revert

  1. Remove the config line from your Neovim init:

    sed -i "/colorscheme.*tinct/d" ~/.config/nvim/init.lua

    …and remove theme = 'tinct' from your lualine setup if you set it.

  2. Delete the generated files:

    rm ~/.config/nvim/colors/tinct.lua \
    ~/.config/nvim/lua/lualine/themes/tinct.lua
  3. Reload to drop the theme: pick another colorscheme inside Neovim:

    :colorscheme default
  4. External state: this plugin only writes under ~/.config/nvim/. The in-process file watcher installed by the colorscheme stops itself on VimLeavePre; deleting the colorscheme file before exit will simply make the next :source fail silently.

Flags

FlagDefaultDescription
--neovim.output-dir~/.config/nvim/colorsOverride the output directory for the colorscheme file
--neovim.theme-nametinctTheme name — drives the generated filenames and vim.g.colors_name

Colour role mapping

Highlight group(s)Tinct roleNotes
Normal, NormalNC, WinBarbackground + foregroundEditor surfaces
NormalFloat, Pmenu, CursorLinebackgroundMutedFloating UI / cursor line
LineNr, SignColumn, FoldedforegroundMutedSecondary text and gutter
CursorLineNr, Function, Keyword, Statement, Tag, @function, @keyword.*accent1Primary syntax accent (functions, keywords)
Constant, Boolean, Type, PreProc, @constant.builtin, @type.builtinaccent2Types, constants, preprocessor
Number, Special, @string.escapeaccent3Literals and escapes
String, MoreMsg, DiffAdd, DiagnosticOk, GitSignsAddsuccessString literals + git/diff add
Search, WarningMsg, DiagnosticWarn, Todo, GitSignsChange (info)warningSearch highlight, warnings
ErrorMsg, Error, Exception, DiagnosticError, DiffDelete, GitSignsDelete, SpellBaddangerErrors and deletions
Question, DiagnosticInfo, DiffChange, @markup.linkinfoInformational diagnostics, hyperlinks
terminal_color_0terminal_color_15ansi.*16-colour ANSI palette via ansi template function

The full mapping covers ~150 highlight groups (Normal/NormalNC/NormalFloat, full Treesitter @capture table, LSP Diagnostic* and LspReference*, Telescope, NvimTree, GitSigns). See the template for the complete list.

Customising the template

Extract the default templates to override them:

tinct plugins templates dump -o neovim -l ~/.config/tinct/templates/neovim

This creates ~/.config/tinct/templates/neovim/theme.lua.tmpl and ~/.config/tinct/templates/neovim/lualine_theme.lua.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for the available functions and palette accessors.

Troubleshooting

colorscheme tinct: not found

The colorscheme must live somewhere on &runtimepath. The default output directory (~/.config/nvim/colors) is on the runtimepath of any standard Neovim install. If you overrode --neovim.output-dir, ensure that directory's parent is on the runtimepath, or symlink the file into ~/.config/nvim/colors/.

Live reload doesn't fire

The file watcher is started inside the colorscheme file itself, so it only exists once that file has been sourced. Run :colorscheme tinct once per session; from then on, regenerations apply automatically. If vim.g.colors_name changes (you switch to another scheme), the watcher stops applying updates — switch back to tinct to re-arm it.

lualine theme not found

Lualine looks for themes via runtime! discovery. The plugin places the theme at ~/.config/nvim/lua/lualine/themes/tinct.lua so it resolves regardless of plugin load order. If lualine reports the theme as missing, confirm that path exists and that ~/.config/nvim is on &runtimepath (:echo &runtimepath from inside Neovim).

Highlight groups look off after switching files

Some plugins re-apply their own highlights on ColorScheme. If a plugin's overrides clobber tinct, define an autocmd that re-applies your customisations after the colorscheme loads, or fork the template to add the highlight groups that plugin expects.

  • tmux — terminal multiplexer status line, complementary to Neovim sessions.
  • zellij — alternative multiplexer with native theme support.
  • ghostty / kitty / alacritty — terminal emulator themes so the surrounding shell matches.