Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field To Run 'Config' For Eva-Theme.nvim #2

Open
pojokcodeid opened this issue Nov 6, 2024 · 2 comments
Open

Field To Run 'Config' For Eva-Theme.nvim #2

pojokcodeid opened this issue Nov 6, 2024 · 2 comments

Comments

@pojokcodeid
Copy link

pojokcodeid commented Nov 6, 2024

Hai,

I have error

Failed to run `config` for Eva-Theme.nvim

...nvim/lazy/nvim-lazy/lua/pcode/plugins/theme/evatheme.lua:17: attempt to index local 'color' (a nil value)

# stacktrace:
  - lua/core/lazy.lua:45
  - lua/core/init.lua:3
  - init.lua:1

Neovim Version = 0.10.1
Terminal = Wezterm

My Config

{
  "sharpchen/Eva-Theme.nvim",
  lazy = false,
  priority = 1000,
  build = ":EvaCompile",
  config = function()
    local color = require("Eva-Theme.palette").dark_base
    require("Eva-Theme").setup({
      override_highlight = {
        dark = {
          ["WinBar"] = { bg = color.background },
          ["WinBarNC"] = { bg = color.background },
        },
      },
    })
  end
}

Preview :
image

@sharpchen
Copy link
Owner

Not reproducible on my machine, I don't think it's a bug from Eva-Theme, have you tried update or reinstall? Some files might not be fetched successfully by lazy.

@pojokcodeid
Copy link
Author

pojokcodeid commented Nov 6, 2024

I load from another repo with lazy.nvim, like this

-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
  if vim.v.shell_error ~= 0 then
    vim.api.nvim_echo({
      { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
      { out, "WarningMsg" },
      { "\nPress any key to exit..." },
    }, true, {})
    vim.fn.getchar()
    os.exit(1)
  end
end
vim.opt.rtp:prepend(lazypath)

-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"

-- Setup lazy.nvim
require("lazy").setup({
  spec = {
    -- import your plugins
    {
      "pojokcodeid/nvim-lazy",
      import = "pcode.plugins",
    },
  
  },
  -- Configure any other settings here. See the documentation for more details.
  -- colorscheme that will be used when installing plugins.
  install = { colorscheme = { "habamax" } },
  -- automatically check for plugin updates
  checker = { enabled = true },
})

if only using single repo is not a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants