Ruby 对 Neovim 的支持
Ruby support for Neovim.
Add this line to your application's Gemfile:
gem "neovim"And then execute:
bundleOr install it yourself as:
gem install neovimNeovim supports the --listen option for specifying an address to serve its RPC API. To connect to Neovim over a Unix socket, start it up like this:
$ nvim --listen /tmp/nvim.sockYou can then connect to that socket path to get a Neovim::Client:
require "neovim"
client = Neovim.attach_unix("/tmp/nvim.sock")Refer to the Neovim docs for other ways to connect to nvim, and the Neovim::Client docs for a summary of the client interface.
Remote modules allow users to define custom handlers in Ruby. To implement a remote module:
neovimjobstartnvim_create_user_command that route to the job's channel IDFor usage examples, see:
Note: Remote modules are a replacement for the deprecated "remote plugin" architecture. See https://github.com/neovim/neovim/issues/27949 for details.
The Neovim gem also acts as a compatibility layer for Ruby plugins written for vim. The :ruby, :rubyfile, and :rubydo commands are intended to match their original behavior, and their documentation can be found here.
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)暂无开放 Issues,或尚未同步最近议题。