Skip to content

Fix some oddities in InitPlugins() - #4249

Merged
JoeKar merged 2 commits into
micro-editor:masterfrom
dmaluka:initplugins-minor-fixes
Sep 29, 2026
Merged

JoeKar merged 2 commits into
micro-editor:masterfrom
dmaluka:initplugins-minor-fixes

Conversation

@dmaluka

@dmaluka dmaluka commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Fix a couple of oddities in micro's plugins initialization code I've noticed while reviewing #4247:

  • micro overzealously tries to parse plugin info from any *.json files it can find in the plugin's directory, not just from repo.json.
  • micro needlessly looks for repo.json (or any other *.json files, see above) for built-in plugins as well, not just for plugins in ~/.config/micro/plug/.

According to the documentation, micro reads plugin info from the
`repo.json` file in the plugin's directory. In reality, micro reads
plugin info from each and every `*.json` file in the plugin's directory,
not only from `repo.json` (so if there are multiple json files, each
next one overrides info read from the previous one). Fix this absurdity.
Built-in plugins don't have repo.json and never will, there is no point
in checking if they have one, this only results in code duplication and
dead code.
@JoeKar
JoeKar merged commit 0216478 into micro-editor:master Sep 29, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants