nvim 1.9.0 → 1.10.0
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/INFO.yaml +1 -1
- data/README.md +17 -9
- data/lib/neovim/info.rb +2 -2
- data/lib/neovim/ruby_provider.rb +3 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc85eeab49096ed77dd13e5180ab09be73eefbfe902c1b072df4a4a1e43a3ab4
|
4
|
+
data.tar.gz: dfe8c784d1fa82258905ab6391a6ff5a96452fabf2c48a04d252080e9a7d91e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a1efb791771fe4ff4e07d18dfc1c7c6692d052227177fdcc53b1f2b3c708426c8b726e5378b010d466f8c925b53cab234bdc0750162263e39dfb8e0ab2efd8'
|
7
|
+
data.tar.gz: 4528ee24eedd1cedd741c9e195372a63e70131ba0a6adbed692fcf21c6cc6ce52bbccf88151a096070b706667aec5ec0dc58f8350400bfda6399eec5b5682e84
|
data/INFO.yaml
CHANGED
data/README.md
CHANGED
@@ -126,18 +126,24 @@ This results in:
|
|
126
126
|
:
|
127
127
|
```
|
128
128
|
|
129
|
-
To inhibit the output of the last value,
|
130
|
-
|
129
|
+
To inhibit the output of the last value, set the
|
130
|
+
`$result` variable to `false`.
|
131
|
+
|
132
|
+
| $result | Output |
|
133
|
+
| ------------- |---------------------------|
|
134
|
+
| `nil` | every result except `nil` |
|
135
|
+
| `false` | nothing |
|
136
|
+
| `true` | every result, even `nil` |
|
131
137
|
|
132
138
|
```
|
133
|
-
|
139
|
+
1 $result = true
|
140
|
+
2 puts "hi"
|
141
|
+
3 #=> nil
|
134
142
|
~
|
135
143
|
~
|
136
|
-
|
144
|
+
:1,2ruby |
|
137
145
|
```
|
138
146
|
|
139
|
-
In this case, you may even omit the pipe (`|`) character.
|
140
|
-
|
141
147
|
|
142
148
|
#### Last return value
|
143
149
|
|
@@ -227,6 +233,8 @@ Then:
|
|
227
233
|
:5ruby |
|
228
234
|
```
|
229
235
|
|
236
|
+
If `$result` is `false`, `$rescue` will be ignored.
|
237
|
+
|
230
238
|
Even non-standard errors wil be caught.
|
231
239
|
|
232
240
|
```
|
@@ -306,9 +314,9 @@ pp $vim.obj_classes.map { |c| [ c.type, ($vim.obj_functions c).sort] }.to_h
|
|
306
314
|
:%ruby |-
|
307
315
|
```
|
308
316
|
|
309
|
-
Deprecated functions
|
310
|
-
|
311
|
-
`get_api_info`.
|
317
|
+
Deprecated functions will be hidden unless you set the environment variable
|
318
|
+
`NVIM_RUBY_STRICT=off`. Old functions not starting with `nvim_` will be hidden.
|
319
|
+
The full list of API functions can be obtained by a call to `get_api_info`.
|
312
320
|
|
313
321
|
```
|
314
322
|
pp $vim.get_api_info
|
data/lib/neovim/info.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require "neovim/meta.rb"
|
2
2
|
Neovim::INFO = Neovim::Meta.new "nvim",
|
3
|
-
version: "1.
|
3
|
+
version: "1.10.0",
|
4
4
|
license: "BSD-2-Clause+",
|
5
5
|
authors: ["Bertram Scharpf"],
|
6
6
|
email: "software@bertram-scharpf.de",
|
7
7
|
summary: "Yet another Ruby client for Neovim",
|
8
8
|
description: "A simple Ruby client for Neovim.\nClean code, minimal dependecies, no frills, no wokeness.",
|
9
9
|
homepage: "https://github.com/BertramScharpf/ruby-nvim",
|
10
|
-
commit: "
|
10
|
+
commit: "40737d0"
|
data/lib/neovim/ruby_provider.rb
CHANGED
@@ -147,8 +147,7 @@ module Neovim
|
|
147
147
|
# This is called by the +:ruby+ command.
|
148
148
|
dsl.rpc :ruby_execute do |client,code,fst,lst|
|
149
149
|
code.rstrip!
|
150
|
-
if code
|
151
|
-
no_out = $1
|
150
|
+
if code == "|" then # | is a workaround because Neovim doesn't allow empty code (the ultimate Quine).
|
152
151
|
set_globals client, fst..lst do |lines|
|
153
152
|
client.command "#{lst}"
|
154
153
|
WriteBuf.redirect client do
|
@@ -156,10 +155,10 @@ module Neovim
|
|
156
155
|
script_binding.eval lines.to_s, "ruby_run"
|
157
156
|
rescue Exception
|
158
157
|
$@.pop until $@.empty? or $@.last.ends_with? ":in `empty_binding'"
|
159
|
-
raise unless $rescue
|
158
|
+
raise unless $rescue and $result != false
|
160
159
|
$!
|
161
160
|
end
|
162
|
-
unless
|
161
|
+
unless $result == false or (not $result and r.nil?) then
|
163
162
|
script_binding.local_variable_set :_, r
|
164
163
|
puts "#=> #{r.inspect}"
|
165
164
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nvim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
email: software@bertram-scharpf.de
|
13
13
|
executables:
|