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

Cannot find colorscheme error when setting colorscheme in plugin config #22

Closed
AzurIce opened this issue Apr 2, 2024 · 3 comments
Closed

Comments

@AzurIce
Copy link

AzurIce commented Apr 2, 2024

I'm trying to install and configure material.nvim

my lua/plugin/material.lua is as follows:

require('material').setup({
  -- ...
})

vim.cmd.colorscheme 'material'

error:

5113: Error while calling lua chunk: ...cal/share/nvim/rocks/rocks_rtp/lua/rocks-config/init.lua:41: /Users/azurice/.config
/nvim/lua/plugins/material.lua:69: Vim:E185: cannot find colorscheme 'material'
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/rocks/rocks_rtp/lua/rocks-config/init.lua:41: in function 'setup'
        ...rocks/rocks_rtp/lua/rocks-config/rocks/hooks/preload.lua:20: in function 'hook'
        ...local/share/nvim/rocks/rocks_rtp/lua/rocks/api/hooks.lua:63: in function 'run_preload_hooks'
        .../luarocks/rocks-5.1/rocks.nvim/2.19.1-1/plugin/rocks.lua:31: in main chunk

And it doesn't appear in the auto completion of :colorscheme,
But if I remove the line vim.cmd.colorscheme 'material', It shows in the colorscheme list, and I can use :colorscheme to set it correctly.

What's the proper way to set colorscheme?

@mrcjkb
Copy link
Member

mrcjkb commented Apr 2, 2024

Hey 👋

See this response regarding colorschemes 😃

I think we probably need to add some clearer documentation for colorschemes to the readmes. This is the third time this issue has come up 😅

@AzurIce
Copy link
Author

AzurIce commented Apr 2, 2024

Oh, I see! Thanks very much for your reply, and sorry for bothering again. 🤣

@mrcjkb
Copy link
Member

mrcjkb commented Apr 2, 2024

This is a rocks.nvim issue, so I've created nvim-neorocks/rocks.nvim#237.
Closing this as duplicate.

@mrcjkb mrcjkb closed this as completed Apr 2, 2024
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