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

Add wiki page to create a plugin #1311

Open
ghost opened this issue May 3, 2023 · 1 comment
Open

Add wiki page to create a plugin #1311

ghost opened this issue May 3, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented May 3, 2023

Problem

I am working on #78, however I can't find any info on how to create a plugin.

Proposal

Add docs for creating plugins, using the API...

Prior Art (Optional)

No response

@jeremypw
Copy link
Collaborator

To create a PR for a new core plugin the simplest way is to inspect the code of the existing ones and also of PluginManager.vala. In activate() function of the .vala file, you need to connect to the relevant hooks (signals) from the plugin manager and write the necessary handlers. Otherwise the code is just boilerplate. The editorconfig plugin is one of the simplest. You will also need .plugin and meson.build files but these are pretty self explanatory. You also need to add your plugin to plugins/meson.buid for it to compile.

While a lot of Git stuff is in the main code, I guess a Github plugin is a valid use since in principle there might be e.g. a Gitlab plugin as an alternative.

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

1 participant