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

[needs triage] colorschemes added to rtp after init.lua is sourced #237

Closed
mrcjkb opened this issue Apr 2, 2024 · 2 comments · Fixed by #267
Closed

[needs triage] colorschemes added to rtp after init.lua is sourced #237

mrcjkb opened this issue Apr 2, 2024 · 2 comments · Fixed by #267

Comments

@mrcjkb
Copy link
Member

mrcjkb commented Apr 2, 2024

Originally posted by @Rasmus-Bertell in #212

To reproduce:

  • :Rocks install kanagawa.nvim
  • In init.lua: vim.cmd.colorscheme("kanagawa")

Expected behaviour:

  • Colorscheme loaded

Actual behaviour:

  • Colorscheme not found error

Workaround:

  • Install with opt=true
  • require("rocks").packadd("kanagawa.nvim") before the vim.cmd.colorscheme call.
@mrcjkb mrcjkb changed the title [Bug] colorschemes added to rtp after init.lua is sourced [needs triage] colorschemes added to rtp after init.lua is sourced Apr 3, 2024
@mrcjkb
Copy link
Member Author

mrcjkb commented Apr 3, 2024

Summary of matrix discussions:

Not sure if there's a good solution to this.
Requiring a rocks.init_rtp call would be a breaking change that is no more convenient than using rocks.packadd. Symlinking colorscheme scripts might be a bit hacky and complex.
rocks-config could help abstract this by separating init (pre-plugin-sourcing) and config scripts in some way.

@mrcjkb
Copy link
Member Author

mrcjkb commented Apr 11, 2024

Thought: There's no harm in adding all rocks to the rtp before running the preload hooks.
This would solve the problem for rocks-config.nvim.

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

Successfully merging a pull request may close this issue.

1 participant