Module: Neovim
- Defined in:
- lib/neovim/meta.rb,
lib/neovim.rb,
lib/neovim/host.rb,
lib/neovim/client.rb,
lib/neovim/output.rb,
lib/neovim/remote.rb,
lib/neovim/handler.rb,
lib/neovim/logging.rb,
lib/neovim/connection.rb,
lib/neovim/remote_object.rb,
lib/neovim/ruby_provider.rb,
lib/neovim/tools/calculator.rb,
lib/neovim/vimscript_provider.rb
Overview
neovim/meta.rb – Metadata: Version info etc.
Defined Under Namespace
Modules: Logging, OptionAccess
Classes: Buffer, Calculator, Client, Connection, ConnectionChild, ConnectionStdio, ConnectionTcp, ConnectionUnix, DslBase, DslPlain, DslProvider, DslRemote, DslVimscript, Handler, HandlerPlain, Host, Job, Meta, Provider, Remote, RemoteObject, Tabpage, Window, Write, WriteBuf, WriteErr, WriteOut, WriteStd
Constant Summary
collapse
- INFO =
Neovim::Meta.new "nvim",
version: "1.2.0",
license: "BSD-2-Clause+",
authors: ["Bertram Scharpf"],
email: "[email protected]",
summary: "Yet another Ruby client for Neovim",
description: "A simple Ruby client for Neovim.\nClean code, minimal dependecies, no frills, no wokeness.",
homepage: "https://github.com/BertramScharpf/ruby-nvim",
commit: "2f15f07"
Class Method Summary
collapse
Class Method Details
.get_lines(client, range) ⇒ Object
112
113
114
|
# File 'lib/neovim/ruby_provider.rb', line 112
def get_lines client, range
client.buf_get_lines 0, range.begin-1, range.end, true
end
|
.mk_plugins(&block) ⇒ Object
25
26
27
|
# File 'lib/neovim.rb', line 25
def mk_plugins &block
{ remote: (DslRemote.open &block) }
end
|
.plugin_provider(&block) ⇒ Object
116
117
118
|
# File 'lib/neovim/ruby_provider.rb', line 116
def plugin_provider &block
run_dsl DslProvider, &block
end
|
.set_global_client(client) ⇒ Object
95
96
97
98
99
100
|
# File 'lib/neovim/ruby_provider.rb', line 95
def set_global_client client
$vim = client
yield
ensure
$vim = nil
end
|
.set_globals(client, range) ⇒ Object
102
103
104
105
106
107
108
109
110
|
# File 'lib/neovim/ruby_provider.rb', line 102
def set_globals client, range
set_global_client client do
lines = get_lines client, range
$range, $lines = range, lines
yield lines
end
ensure
$range, $lines = nil, nil
end
|
.start_remote(&block) ⇒ Object
21
22
23
|
# File 'lib/neovim.rb', line 21
def start_remote &block
Job.run mk_plugins &block
end
|