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

Plugin Activation #2

Closed
FractalArt opened this issue Dec 13, 2020 · 8 comments
Closed

Plugin Activation #2

FractalArt opened this issue Dec 13, 2020 · 8 comments

Comments

@FractalArt
Copy link

I am new to micro and installed this plugin via the command mentioned on the plugins page:

> micro -plugin install nord-colors

which creates the directory ~/.config/micro/plug/nord-colors/. However, I don't seem to be able to activate it. My first attempt was to run

> set colorscheme nord-colors

which resulted in nord-colors is not a valid colorscheme. Inspecting the created directory, I saw that the definition files seemed to be of the form nord-16.micro

so I also tried

> set colorscheme nord-16

which resulted in the same error. Would you mind clarifying how I can "activate" the nord colors? Maybe it works differently since this is considered a plugin and not a colorscheme.

@KiranWells
Copy link
Owner

I am aware of this issue and am trying to fix it. The issue is that the .lua file that is supposed to add the colorscheme files to micro is not running correctly. Until I figure it out, you can manually install by moving the colorschemes (.micro files) to the colorschemes directory.

mkdir ~/.config/micro/colorschemes
mv ~/.config/micro/plug/nord-colors/*.micro ~/.config/micro/colorschemes

@FractalArt
Copy link
Author

Perfect, that works.

Thanks a lot for your help!

@KiranWells
Copy link
Owner

The issue still seems to exist, even with the new .lua file. This may take some time to fix, until then, anyone who has this issue can use the commands listed above to manually enable the colorschemes.

@KiranWells
Copy link
Owner

The issue is now fixed; make sure to run the nordsetup command to set up the files after installation. I will make an issue on the main Micro GitHub later to address the issue of runtime files not being visible at startup.

@zyedidia
Copy link

You should be able to use AddRuntimeFile similar to how it is done here: https://github.com/Theodus/micro-monokai-dark. Is there a problem with that method?

@KiranWells
Copy link
Owner

Unfortunately, using AddRuntimeFile runs after micro checks for the colorscheme, so it always says nord-tc is not a valid colorscheme even when I can enable it directly after. Also, using AddRuntineFile as the other plugins do without importing micro/config leads to a lua error, since it is not defined.

I can post a more detailed issue on the micro main channel if you would like.

@zyedidia
Copy link

I think it should work fine if you run it in the script top-level (not inside the init function). For example:

VERSION = "1.1.3"

local config = import("micro/config")

config.AddRuntimeFile("nordcolors", config.RTColorscheme, "colorschemes/nord-tc.micro")
config.AddRuntimeFile("nordcolors", config.RTColorscheme, "colorschemes/nord-tc-light.micro")
config.AddRuntimeFile("nordcolors", config.RTColorscheme, "colorschemes/nord-16.micro")
config.AddRuntimeFile("nordcolors", config.RTColorscheme, "colorschemes/nord-16-light.micro")
config.AddRuntimeFile("nordcolors", config.RTHelp, "help/nordcolors.md")

@KiranWells
Copy link
Owner

I will check that to make sure

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

3 participants