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

Erorr while sourcing colors.lua #81

Closed
umairmaratab opened this issue Jun 15, 2023 · 8 comments
Closed

Erorr while sourcing colors.lua #81

umairmaratab opened this issue Jun 15, 2023 · 8 comments

Comments

@umairmaratab
Copy link

umairmaratab commented Jun 15, 2023

When I try to source colors.lua file it says:

Screenshot from 2023-06-15 13-52-16

I copied the exact content from colors.lua file in after/plugin directory.

Thanks in advance for your help.

@mehmetrecep
Copy link

I think after saving the colors.lua you have to call the function ColorMyPencils() by typing :lua ColorMyPencils()

@umairmaratab
Copy link
Author

Thanks for your answer.
Same Error.

@mehmetrecep
Copy link

I don't if you use it after accessing to the directory of nvim after writing nvim . in the terminal.
you're welcome bro

@mehmetrecep
Copy link

That's the code that I wrote :

function ColorMyPencils(color)
color = color or "rose-pine"
vim.cmd.colorscheme(color)

vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })

end

ColorMyPencils()

you can use it and try again.

@umairmaratab
Copy link
Author

umairmaratab commented Jun 17, 2023

I think error is somewhere else, as when I execute nvim . it says:

Error detected while processing /home/user-name/.local/share/nvim/site/pack/packer/start/rose-pine/colors
/rose-pine.lua:
W18: Invalid character in group name

@umairmaratab
Copy link
Author

Full description of error:
Error detected while processing /home/user-name/.local/share/nvim/site/pack/packer/start/rose-pine/colors
/rose-pine.lua:
W18: Invalid character in group name
.
.
.
W18: Invalid character in group name

Error detected while processing /home/user-name/.config/nvim/after/plugin/colors.lua:
E5113: Error while calling lua chunk: /home/user-name/.config/nvim/after/plugin/colors.lua:7: attempt to
index field 'cmd' (a function value)
stack traceback:
/home/user-name/.config/nvim/after/plugin/colors.lua:7: in function 'ColorMyPencils'
/home/user-name/.config/nvim/after/plugin/colors.lua:14: in main chunk
Press ENTER or type command to continue

@mehmetrecep
Copy link

you can see this issue:
neovim/neovim#14202

@umairmaratab
Copy link
Author

Thank u it was actually due to older version of nvim.
I installed via source and now everything is fine.

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