neovim 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/neovim/client.rb +20 -0
- data/lib/neovim/ruby_provider/vim.rb +1 -1
- data/lib/neovim/version.rb +1 -1
- data/spec/neovim/client_spec.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af56f57f1cf54f8adc5229739e6bc59970b993c2
|
4
|
+
data.tar.gz: d9c97e2f4086a239d18cad60b0e0143df4a5b476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a209db461c6fd40c4b43cf2dc71b0a156e2dd563d6ca3644b383cfd3a625ab6e8302de6f60e1bab216a9efd93db9ad22479687764f41346f806526356034d390
|
7
|
+
data.tar.gz: ea4a5ff5be12e6d6e9bf57c454d5cc8fe7d198bcb80329d2a62cad7a2202987a25575c542f51dbe3e501e5cc6a74ea9dcc5719678de4669d193262ad0a0c8b9a
|
data/CHANGELOG.md
CHANGED
data/lib/neovim/client.rb
CHANGED
@@ -68,6 +68,26 @@ module Neovim
|
|
68
68
|
out_write(string)
|
69
69
|
end
|
70
70
|
|
71
|
+
# Set an option.
|
72
|
+
#
|
73
|
+
# @overload set_option(key, value)
|
74
|
+
# @param [String] key
|
75
|
+
# @param [String] value
|
76
|
+
#
|
77
|
+
# @overload set_option(optstr)
|
78
|
+
# @param [String] optstr
|
79
|
+
#
|
80
|
+
# @example Set the +timeoutlen+ option
|
81
|
+
# client.set_option("timeoutlen", 0)
|
82
|
+
# client.set_option("timeoutlen=0")
|
83
|
+
def set_option(*args)
|
84
|
+
if args.size > 1
|
85
|
+
@api.function("vim_set_option").call(@session, *args)
|
86
|
+
else
|
87
|
+
@api.function("vim_command").call(@session, "set #{args.first}")
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
71
91
|
private
|
72
92
|
|
73
93
|
def rpc_methods
|
data/lib/neovim/version.rb
CHANGED
data/spec/neovim/client_spec.rb
CHANGED
@@ -72,7 +72,19 @@ module Neovim
|
|
72
72
|
it "sets an option" do
|
73
73
|
expect {
|
74
74
|
client.set_option("makeprg", "rake")
|
75
|
-
}.to change { client.get_option("makeprg") }
|
75
|
+
}.to change { client.get_option("makeprg") }.to("rake")
|
76
|
+
end
|
77
|
+
|
78
|
+
it "sets an option as a single string" do
|
79
|
+
expect {
|
80
|
+
client.set_option("makeprg=rake")
|
81
|
+
}.to change { client.get_option("makeprg") }.to("rake")
|
82
|
+
end
|
83
|
+
|
84
|
+
it "sets an integer option as a single string" do
|
85
|
+
expect {
|
86
|
+
client.set_option("timeoutlen=0")
|
87
|
+
}.to change { client.get_option("timeoutlen") }.to(0)
|
76
88
|
end
|
77
89
|
end
|
78
90
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neovim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Genco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|