test: go rpc app - #2
Closed
vieitesss wants to merge 18 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a small Go-based Msgpack-RPC server and a Lua caller to exercise it from this Neovim configuration.
Changes:
- Add
features.test-rpcLua module that starts an RPC job and makes amultiplyrequest. - Add a Go RPC app (
go/test-rpc) registering amultiplyhandler viagithub.com/neovim/go-client. - Invoke the RPC test from
init.luaand introduce a standalone Go module undergo/.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/features/test-rpc/init.lua | Starts an RPC job and issues a multiply request, printing the response. |
| init.lua | Runs the new test-rpc feature during startup. |
| go/test-rpc/main.go | Initializes the Go RPC server over stdio and registers the handler. |
| go/test-rpc/test.go | Implements argument parsing and the multiply handler. |
| go/README.md | Documents the Go “features” folder and the test-rpc example. |
| go/go.mod | Adds a Go module and dependency on github.com/neovim/go-client. |
| go/go.sum | Adds checksums for the new Go dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+20
| local info = vim.json.decode(data[1]) | ||
| vim.print("result: " .. info.result) |
Comment on lines
+70
to
+74
|
|
||
| job = start_job() | ||
| if job < 1 then | ||
| return | ||
| end |
Comment on lines
+107
to
+111
| local function ensure_autocmd() | ||
| vim.api.nvim_create_autocmd({ "VimLeavePre" }, { | ||
| pattern = { "*" }, | ||
| callback = function(_) | ||
| if job and job > 0 then |
| }) | ||
| if j == 0 then | ||
| vim.notify( | ||
| "invalid arguments to jobstart(): `" .. binary .. "` and `nil`", |
| }) | ||
| if ok and chan > 0 then | ||
| channel = chan | ||
| vim.print(attempts) |
Comment on lines
+3
to
+4
| go 1.26.2 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.