-
Notifications
You must be signed in to change notification settings - Fork 36
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
simplify remote plugins #167
Comments
@justinmk I don't understand all the new "remote modules" behavior yet, but I decided to work on the migration process ASAP. |
Delete the plugin package and any references to that package in the documentation.
The package accomplishes this goal as is: Step 1 The application creates a new Nvim client connected to stdio:
Step 2 The application registers handlers with the nvim client using the client's RegisterHandler method. Step 3 The application runs the the RPC message loop.
Optional enhancement Encapsulate the stdio related code in a helper function.
Example use:
Edit: I moved the call to v.Serve() from the helper function to the application's main. This gives the application more control over how Serve() is run. Edit: I wrote the code in this comment directly in the issue tracker. The code has not been compiled, let alone tested. |
@garyburd thanks so much, that is very helpful. So this is basically already supported by go-client.
💯 |
@justinmk Yes, it's already supported. I propose the following:
I have some time for this in the next couple of days. @zchee and @justinmk let me know your thoughts on the proposal. |
Sounds good!
27949 won't be a "big bang", we'll have to do it incrementally. Since go-client already has This will be doubly helpful, as an end-to-end demonstration of the logistics for 27949. Of course, in the future Nvim may gain nice-to-have features that make it more convenient to spin up a long-lived client and call its RPC methods. But I don't see that as a requirement for this phase. |
@justinmk I wanted to wait on 27949 before adding an API in case the work on 27949 exposes additional requirements for the API. If you think things are baked enough, then I'll proceed ahead with the API and deprecation. I may not be able to get to it for a couple of weeks. Here's a list of public Go plugins: https://pkg.go.dev/github.com/neovim/go-client/nvim/plugin?tab=importedby |
We may weave-in more nice-to-have ideas later, but that will just upgrade the UX rather than be a hard requirement. Currently, the (informal) requirements for a remote plugin are:
|
Problem
The design, and usage, of remote plugins can be simplified, as described in neovim/neovim#27949
tl;dr:
Solution
RegisterHandler
, so the remaining tasks are:Reference
The text was updated successfully, but these errors were encountered: