Skip to content

"Failed to run config for themery.nvim..." error on NVIM startup #37

@joehdodd

Description

@joehdodd

Hi All,

I am intermittently getting an error from Themery when starting NVIM.

Failed to run `config` for themery.nvim

.../share/nvim/lazy/themery.nvim/lua/themery/controller.lua:21: bad argument #1 to 'pairs' (table expected, got nil)

# stacktrace:
  - /themery.nvim/lua/themery/controller.lua:21 _in_ **loadActualThemeConfig**
  - /themery.nvim/lua/themery/controller.lua:229 _in_ **bootstrap**
  - /themery.nvim/lua/themery/init.lua:7
  - .config/nvim/lua/custom/plugins/themery.lua:5 _in_ **config**
  - .config/nvim/init.lua:230

When that error shows during startup, I also get the following error when trying to run Themery/change colorschemes:

E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'themery'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

My config is as follows:

return {
  'zaldih/themery.nvim',
  lazy = false,
  config = function()
    require('themery').setup {
      themes = {
        { colorscheme = 'catppuccin-macchiato', name = 'Catppuccin Macchiato' },
        { colorscheme = 'catppuccin-frappe', name = 'Catppuccin Frappe' },
        { colorscheme = 'catppuccin-latte', name = 'Catppuccin Latte' },
        { colorscheme = 'tokyonight-storm', name = 'TokyoNight Storm' },
        { colorscheme = 'tokyonight-day', name = 'TokyoNight Day' },
      },
      livePreview = true,
    }
  end,
  keys = {
    { '<leader>tc', ':Themery<CR>', desc = 'Toggle Colorschemes' },
  },
}

Is my config incorrect?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions