Plugins and LeoPyRef.leo

23 views
Skip to first unread message

Thomas Buttler

unread,
Jan 7, 2022, 1:56:20 PM1/7/22
to leo-editor
What is the cooperative way to write a plugin?  The documentation for writing plugins mentions leoPy.leo, but it is not in the repository - does one copy LeoPyRef.leo to leoPy.leo and make changes there?  If so, how does one contribute back?  Adding a plugin  to LeoPyRef.leo works, but does a rewrite/reordering of that file when using the development version of Leo.  Is there a particular version of Leo one uses to edit LeoPyRef.leo, or is there some other workflow?

A pull request to support elixir @doc is available for consideration, but it may not be appropriate for all  or have deficiencies such as a lack of unit tests.  Perhaps it could be a plugin that monkey-patched class AtFile.

tbp1...@gmail.com

unread,
Jan 7, 2022, 2:25:56 PM1/7/22
to leo-editor
I have written two plugins.  It's easy enough to add one to Leo via a pull request.  That alone does not put it into LeoPyRef, but the plugin will be available anyway since it will be in Leo's plugins directory.  IIRC, @ekr added one of them to LeoPyRef on his own, and added the other after I noticed it wasn't there and asked him to.

Edward K. Ream

unread,
Jan 10, 2022, 11:08:18 AM1/10/22
to leo-editor
On Fri, Jan 7, 2022 at 2:25 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
I have written two plugins.  It's easy enough to add one to Leo via a pull request.  That alone does not put it into LeoPyRef, but the plugin will be available anyway since it will be in Leo's plugins directory.  IIRC, @ekr added one of them to LeoPyRef on his own, and added the other after I noticed it wasn't there and asked him to.

Yes, a PR is a good idea. Ideally, the PR would include an @file node for your plugin in LeoPyRef.leo, but that is not essential.

Edward
Reply all
Reply to author
Forward
0 new messages