Skip to content

Tinty custom generated schemes not recognized #18

@hadallen

Description

@hadallen

Hi, I found that custom generated schemes are not recognized by the neovim plugin, only built-in colorschemes are found.

I have set up tinted-nvim in my tinty config.toml and have as well added the tinted-theming/tinted-nvim neovim plugin, and created a custom generated scheme (using tinty generate-schema --save --system=base16 /path/to/img.png)

A workaround is to use the .vim file method found in the tinty USAGE.md. I've set the theme script path to the generated file directly:

local theme_script_path = vim.fn.expand("~/.local/share/tinted-theming/tinty/repos/neovim/colors/base24-tinty-generated.vim")

local function file_exists(file_path)
  return vim.fn.filereadable(file_path) == 1 and true or false
end

local function handle_focus_gained()
  if file_exists(theme_script_path) then
      vim.cmd("source " .. theme_script_path)
  end
end

if file_exists(theme_script_path) then
  vim.o.termguicolors = true
  vim.g.tinted_colorspace = 256

  vim.cmd("source " .. theme_script_path)

  vim.api.nvim_create_autocmd("FocusGained", {
    callback = handle_focus_gained,
  })
end

but, using the :colorscheme command in nvim, it is not found:
neovim error: E185: Cannot find color scheme 'base24-tinty-generated`

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions