Class Neovim::Session
In: lib/neovim/session/serializer.rb
lib/neovim/session/request.rb
lib/neovim/session/api.rb
lib/neovim/session/event_loop.rb
lib/neovim/session/rpc.rb
lib/neovim/session/notification.rb
lib/neovim/session.rb
Parent: Object

Wraps a +Session::RPC+ in a synchronous API using +Fiber+s.

@api private

Methods

api   channel_id   child   discover_api   new   notify   request   run   shutdown   stdio   stop   tcp   unix  

Included Modules

Logging

Classes and Modules

Class Neovim::Session::API
Class Neovim::Session::EventLoop
Class Neovim::Session::Notification
Class Neovim::Session::RPC
Class Neovim::Session::Request
Class Neovim::Session::Serializer

Public Class methods

Spawn and connect to a child nvim process.

Connect to the current process‘s standard streams. This is used to promote the current process to a Ruby plugin host.

Connect to a TCP socket.

Connect to a UNIX domain socket.

Public Instance methods

Return the nvim API as described in the vim_get_api_info call. Defaults to empty API information.

Return the channel ID if registered via vim_get_api_info.

Discover the nvim API as described in the vim_get_api_info call, propagating it down to lower layers of the stack.

Make an RPC notification. nvim will not block waiting for a response.

Make an RPC request and return its response.

If this method is called inside a callback, we are already inside a Fiber handler. In that case, we write to the stream and yield the Fiber. Once the response is received, resume the Fiber and return the result.

If this method is called outside a callback, write to the stream and run the event loop until a response is received. Messages received in the meantime are enqueued to be handled later.

Run the event loop, handling messages in a Fiber.

[Validate]