-
Notifications
You must be signed in to change notification settings - Fork 299
A plugins/theme website #2037
Comments
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible. |
Hi @albertorestifo ,
That would be incredible! 💯 Having a solid plugin story is the next step on our roadmap, and having a clear, easy way to discover plugins is essential in realizing that.
No work yet! We have our website code here: https://github.com/onivim/onivim.io, but it's mostly static. The only other mention we have is some work starting on a 'plugins pane' internally in the app (#1431) as a potential entry point for a search experience.
This sounds like a great start, and it's nice because we can just use the GitHub API as opposed to needing to provide our own API. This opens the door to discovering Vim plugins. Later on, I believe we may also leverage NPM, for plugins that utilize Oni's JS/TS API. One other source that is interesting is vimawesome actually exposes an API, too: https://vimawesome.com/
I don't think it's too early to at least get the basics working (like an minimium viable product - just a barebones UX querying against the Let me know if you'd like to chat more, @albertorestifo . Thank you for proposing this! |
Sounds great @bryphe, let's move forward with it then. I would start by creating a small library which will act as api client shared between the website, the in-editor sidebar and the CLI tool described in #186. NPM doesn't seem to expose a public API so it would require a server to find packages. For GitHub, it's pretty straight forward with the GraphQL API. For example: query {
search(first: 10, type: REPOSITORY, query: "topic:oni-theme") {
repositoryCount
}
} As far as using vim-awesome, I don't seem to find a page explicitly documenting the API. It's true that the API the website uses seems well built, but even then, should we use their data? Is it planned to give the possibility of installing a vim theme within the in-editor sidebar? If not then maybe linking to the website is enough. Once that's done, how much work is left to do before the CLI tool describe in #186 can be implemented? If it's a lot, then we can start with the website, where the package will contain a quick copy & paste to install it, otherwise maybe completing the CLI before the website is more sensible. |
Excellent! 🎉
Perfect. GitHub sounds like a great starting point - as long as we are getting some results, we can start testing out the end-to-end flow.
I believe there is a Neovim GUI using this, but I could be mistaken. But it definitely doesn't need to be something we incorporate initially - I think the GitHub provider is the perfect starting point.
Regarding the CLI tool - I was actually considering scrapping it, and having these entry points to plugin management:
Given those pieces of functionality, I'm not sure the CLI is totally necessary - at least not for this PoC. What we could try is maybe creating a simple menu that calls the API:
This would give us a really bare-bones experience we could try out - we spin up a menu that calls the API client, show the menu, and then allow for installing it based on the value. The main gaps we'd need to fill in to test this out are implementing We could put a button in the WIP sidebar pane to expose this - like 'Discover Plugins' - and test it out end-to-end 👍 And then of course increment and improve - it'd be nice to show details about the plugin later, have a confirmation prompt for installing, etc. @albertorestifo , does that seem like an OK way to test the API client? From the website, we could start stubbing out an Either of those actually seem cheaper than the CLI to me at this point - and would be a relatively short path to getting something working end-to-end that we could iterate and improve on. Let me know what you think! Thanks again for your help with this, @albertorestifo 👍 |
https://github.com/daa84/neovim-gtk uses it in their Plugin Manager as far as I know. |
Everything you said @bryphe makes total sense to me and I agree the CLI tool is not really needed. If it sounds good to you, I'll proceed in the following order:
Sounds good? |
@albertorestifo - excellent roadmap! The plan sounds great and the breakdown makes sense to me. 💯 I like that we get a simple end-to-end working relatively early in step 2 - that will be a good foundation for us to improve and iterate on. Agree with having the website be at the end - I envision the in-editor experience will be the primary entry point. Keep me posted and let me know if you need anything! Our discord is a great place to chat too: https://discord.gg/7maEAxV For step 1 - would you like me to start by creating an |
@bryphe that would be awesome! I'll join the discourse and start working on it whenever I get a chance! Happy to be able to help the project. |
@albertorestifo - perfect! I just created the repo here: https://github.com/onivim/oni-extensions-discovery and I gave you Let me know if there is anything else I can do to help 👍 |
@bryphe Awesome, I'll keep you posted. |
@albertorestifo npm have a public api, but it's undocumented (shame on you npm), the api is exposed by the registry and used by the npm cli they use a client for this The search api can be used very simply http://registry.npmjs.org/-/v1/search?text=oni-vim The npm api even set a CORS Allow Header |
That's awesome! On another note, I can't use the GitHub GraphQL API because the search doesn't allow unauthenticated calls. |
Yeah the GraphQL v4 API need authentication for all actions, to do unauthenticated call the V3 API seems more adapted |
I wanted to work on a plugins and themes website, similar to the Visual Studio Code marketplace.
Before starting on the project, I wanted to ask few questions:
My idea was something quite simple and effective: take advantage of the new repository tags feature of GitHub to fetch and catalog the repositories.
So if you tag the repo as
oni-plugin
you appear on the plugins page and so on.The text was updated successfully, but these errors were encountered: