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

(In-progress) Streamline creation of development environment and add usage documentation. #5

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

theKnightsOfRohan
Copy link

I've noticed that, in the process of getting started with banana and writing my own pages, that the setting up of the development environment is a little more difficult than some other development-based plugins, mostly because of banana's novel approach. So, I've started this pull request in order to document the creation of the documentation, as it were.

Here are my plans:

  • Fix bug in tree-sitter initialization where filetypes were not registers
  • Create initial docs for devenv and plugin development
  • Consolidate highest-module lua functions into setup method (setup_plugin() and setup_env()?)
  • Further develop usage page as I get comfortable with using raw html and maybe make some examples

I'm making this PR early so that you know what types of changes I will be making. I would appreciate if you could make sure I don't do anything which conflicts with your vision of this plugin. Feel free to let me know if there's anything else related you want me to work on as well!

@CWood-sdf
Copy link
Owner

This all seems really great! There is not much documentation right now because I have been spending most of my time on core html features (currently I'm working on css grid display, after that I'll probably do

then maybe transitions and animations), so the documentation is not really great right now.

I think consolidating the high level modules into the require('banana') path is a great idea. afaik right now, the only real require needed for a plugin is require("banana.instance").newInstance(), then banana does all the work after that

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this seems really great, thank you so much for doing this!

However, there are a few things that you have setup that I disagree with:

  • the remapping in the jumpstart.lua file should be done in the plugin's setup method
  • the instance could probably be lazily loaded to not trigger unnecessary parsing (this can be done with an if instance == nil ... in the keymap)
  • when you say "all of your lua scripts are called from the index.nml file", i think it might need to be clarified that the banana specific lua scripts are called from the index.nml file. plugin authors will still need their own lua scripts with setup methods, apis and the like. my vision with banana is that a good plugin has a really good api that the plugin author uses for the banana pages (i essentially want banana to incentivize having a good api)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other thing: maybe have a top and left property on the nml selector just to show that the user can change the position with those properties

The rest of this all looks really great and I'm really looking forward to when I can merge this into main

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll specify that the jumpstart file should not be part of the actual plugin, it's just a way to open the page itself for simpler projects. That's why I had it outside the normal project file structure. I haven't had as much time as I would like to work on the docs due to being out of the country, but now I can incorporate your feedback!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha, thanks for clarifying, I was a bit confused by that

@CWood-sdf
Copy link
Owner

I just created an example banana plugin if you want to look at that for how I envision laying out banana plugins

link

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.

3 participants