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

How to install using lazy.nvim? #2

Open
adityamwagh opened this issue Aug 16, 2023 · 1 comment
Open

How to install using lazy.nvim? #2

adityamwagh opened this issue Aug 16, 2023 · 1 comment

Comments

@adityamwagh
Copy link

using { "amarakon/nvim-cmp-fonts", opts = {} } leads to the following error message:

Failed to run `config` for nvim-cmp-fonts
.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:355: attempt to call field 'setup' (a nil value)
# stacktrace:
  - AppData\Local\nvim\init.lua:106
@amarakon
Copy link
Owner

Sorry for the late response. I actually switched to lazy.nvim from packer and I can provide an explanation.

I think the reason it is giving that error is because of the opts = {}. What that does is it attempts to call require("nvim-cmp-fonts").setup(), thus the error attempt to call field 'setup' (a nil value). You are not supposed to do that for nvim-cmp source plugins. What you should instead do is something like this:

{
    "hrsh7th/nvim-cmp",
    dependencies = "amarakon/nvim-cmp-fonts",
    opts = {
        sources = { name = "fonts" }
    }
}

Let me know if this works.

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