neovim 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/tests.yml +15 -17
- data/.gitignore +1 -1
- data/CHANGELOG.md +10 -0
- data/Flavorfile.lock +1 -0
- data/README.md +14 -30
- data/lib/neovim/buffer.rb +84 -47
- data/lib/neovim/client.rb +233 -92
- data/lib/neovim/remote_module/dsl.rb +30 -0
- data/lib/neovim/remote_module.rb +42 -0
- data/lib/neovim/tabpage.rb +6 -1
- data/lib/neovim/version.rb +1 -1
- data/lib/neovim/window.rb +31 -21
- data/lib/neovim.rb +13 -5
- data/neovim.gemspec +4 -4
- data/script/ci/download_nvim.sh +5 -18
- data/script/host_wrapper.bat +3 -0
- data/script/host_wrapper.sh +5 -0
- data/script/run_acceptance.rb +3 -3
- data/spec/acceptance/client_info_spec.vim +14 -30
- data/spec/acceptance/remote_module_spec.vim +13 -0
- data/spec/acceptance/runtime/example_remote_module.rb +11 -0
- data/spec/acceptance/runtime/init.vim +6 -1
- data/spec/acceptance/runtime/plugin/example_remote_module.lua +23 -0
- metadata +35 -24
- /data/{VimFlavor → Flavorfile} +0 -0
data/script/run_acceptance.rb
CHANGED
@@ -8,7 +8,7 @@ ENV.delete("VIMRUNTIME")
|
|
8
8
|
root = File.expand_path("..", __dir__)
|
9
9
|
acceptance_root = File.join(root, "spec/acceptance")
|
10
10
|
themis_rtp = File.join(acceptance_root, "runtime")
|
11
|
-
themis_home = File.join(themis_rtp, "flavors/thinca_vim-themis")
|
11
|
+
themis_home = File.join(themis_rtp, "pack/flavors/start/thinca_vim-themis")
|
12
12
|
manifest = File.join(themis_rtp, "rplugin_manifest.vim")
|
13
13
|
vimrc = File.join(themis_rtp, "init.vim")
|
14
14
|
nvim = ENV.fetch("NVIM_EXECUTABLE", "nvim")
|
@@ -21,7 +21,7 @@ env = {
|
|
21
21
|
"NVIM_RPLUGIN_MANIFEST" => manifest,
|
22
22
|
"THEMIS_VIM" => nvim,
|
23
23
|
"THEMIS_HOME" => themis_home,
|
24
|
-
"THEMIS_ARGS" => "-e
|
24
|
+
"THEMIS_ARGS" => "-e --headless -u #{vimrc}"
|
25
25
|
}
|
26
26
|
|
27
27
|
FileUtils.rm_f(manifest)
|
@@ -30,7 +30,7 @@ Dir.chdir(root) do
|
|
30
30
|
system(
|
31
31
|
env,
|
32
32
|
nvim,
|
33
|
-
"-e", "
|
33
|
+
"-e", "--headless",
|
34
34
|
"-u", vimrc,
|
35
35
|
"+UpdateRemotePlugins", "+qa!"
|
36
36
|
)
|
@@ -9,34 +9,18 @@ function! s:suite.before_each() abort
|
|
9
9
|
\ "v:val.client")
|
10
10
|
endfunction
|
11
11
|
|
12
|
-
function! s:suite.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
endfunction
|
27
|
-
|
28
|
-
function! s:suite.get_rplugin_client_info() abort
|
29
|
-
let client_info = s:client_chans[0]
|
30
|
-
|
31
|
-
call s:expect(sort(keys(client_info))).to_equal(
|
32
|
-
\ ["attributes", "methods", "name", "type", "version"])
|
33
|
-
|
34
|
-
call s:expect(client_info.attributes).to_be_dict()
|
35
|
-
call s:expect(client_info.methods).to_equal({"specs": {"nargs": 1}, "poll": {}})
|
36
|
-
call s:expect(client_info.name).to_equal("ruby-rplugin-host")
|
37
|
-
call s:expect(client_info.type).to_equal("host")
|
38
|
-
|
39
|
-
call s:expect(client_info.version.major).to_be_number()
|
40
|
-
call s:expect(client_info.version.minor).to_be_number()
|
41
|
-
call s:expect(client_info.version.patch).to_be_number()
|
12
|
+
function! s:suite.get_client_info() abort
|
13
|
+
for client_info in s:client_chans
|
14
|
+
call s:expect(sort(keys(client_info))).to_equal(
|
15
|
+
\ ["attributes", "methods", "name", "type", "version"])
|
16
|
+
|
17
|
+
call s:expect(client_info.attributes).to_be_dict()
|
18
|
+
call s:expect(client_info.methods).to_equal({"specs": {"nargs": 1}, "poll": {}})
|
19
|
+
call s:expect(client_info.name).to_match("ruby-\\(script\\|rplugin\\)-host")
|
20
|
+
call s:expect(client_info.type).to_equal("host")
|
21
|
+
|
22
|
+
call s:expect(client_info.version.major).to_be_number()
|
23
|
+
call s:expect(client_info.version.minor).to_be_number()
|
24
|
+
call s:expect(client_info.version.patch).to_be_number()
|
25
|
+
endfor
|
42
26
|
endfunction
|
@@ -0,0 +1,13 @@
|
|
1
|
+
let s:suite = themis#suite("Remote module")
|
2
|
+
let s:expect = themis#helper("expect")
|
3
|
+
|
4
|
+
call themis#helper('command').with(s:)
|
5
|
+
|
6
|
+
function! s:suite.defines_commands() abort
|
7
|
+
RbSetVar set_from_rb_mod foobar
|
8
|
+
call s:expect(g:set_from_rb_mod).to_equal('foobar')
|
9
|
+
endfunction
|
10
|
+
|
11
|
+
function! s:suite.propagates_errors() abort
|
12
|
+
Throws /oops/ :RbWillRaise
|
13
|
+
endfunction
|
@@ -1,7 +1,12 @@
|
|
1
1
|
let s:lib_path = getcwd() . "/lib"
|
2
2
|
let s:exe_path = getcwd() . "/exe/neovim-ruby-host"
|
3
3
|
let g:acceptance_rtp = getcwd() . "/spec/acceptance/runtime"
|
4
|
-
|
4
|
+
|
5
|
+
if has("win32") || has("win64")
|
6
|
+
let g:ruby_host_prog = getcwd() . "/script/host_wrapper.bat"
|
7
|
+
else
|
8
|
+
let g:ruby_host_prog = getcwd() . "/script/host_wrapper.sh"
|
9
|
+
endif
|
5
10
|
|
6
11
|
ruby require "rspec/expectations"
|
7
12
|
ruby include ::RSpec::Matchers.dup
|
@@ -0,0 +1,23 @@
|
|
1
|
+
local chan
|
2
|
+
|
3
|
+
local function ensure_job()
|
4
|
+
if chan then
|
5
|
+
return chan
|
6
|
+
end
|
7
|
+
|
8
|
+
chan = vim.fn.jobstart({
|
9
|
+
'ruby',
|
10
|
+
'-I', 'lib',
|
11
|
+
'spec/acceptance/runtime/example_remote_module.rb',
|
12
|
+
}, { rpc = true })
|
13
|
+
|
14
|
+
return chan
|
15
|
+
end
|
16
|
+
|
17
|
+
vim.api.nvim_create_user_command('RbSetVar', function(args)
|
18
|
+
vim.fn.rpcrequest(ensure_job(), 'rb_set_var', args.fargs)
|
19
|
+
end, { nargs = '*' })
|
20
|
+
|
21
|
+
vim.api.nvim_create_user_command('RbWillRaise', function(args)
|
22
|
+
vim.fn.rpcrequest(ensure_job(), 'rb_will_raise', args.fargs)
|
23
|
+
end, { nargs = 0 })
|
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Genco
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -42,30 +42,30 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '0.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '0.14'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pry-byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,31 +98,31 @@ dependencies:
|
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vim-flavor
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
description:
|
124
|
+
version: '0'
|
125
|
+
description:
|
126
126
|
email:
|
127
127
|
- alexgenco@gmail.com
|
128
128
|
executables:
|
@@ -135,11 +135,12 @@ files:
|
|
135
135
|
- ".gitignore"
|
136
136
|
- CHANGELOG.md
|
137
137
|
- CODE_OF_CONDUCT.md
|
138
|
+
- Flavorfile
|
139
|
+
- Flavorfile.lock
|
138
140
|
- Gemfile
|
139
141
|
- LICENSE.txt
|
140
142
|
- README.md
|
141
143
|
- Rakefile
|
142
|
-
- VimFlavor
|
143
144
|
- exe/neovim-ruby-host
|
144
145
|
- lib/neovim.rb
|
145
146
|
- lib/neovim/api.rb
|
@@ -159,6 +160,8 @@ files:
|
|
159
160
|
- lib/neovim/plugin.rb
|
160
161
|
- lib/neovim/plugin/dsl.rb
|
161
162
|
- lib/neovim/plugin/handler.rb
|
163
|
+
- lib/neovim/remote_module.rb
|
164
|
+
- lib/neovim/remote_module/dsl.rb
|
162
165
|
- lib/neovim/remote_object.rb
|
163
166
|
- lib/neovim/ruby_provider.rb
|
164
167
|
- lib/neovim/ruby_provider/buffer_ext.rb
|
@@ -173,10 +176,13 @@ files:
|
|
173
176
|
- script/ci/download_nvim.sh
|
174
177
|
- script/dump_api.rb
|
175
178
|
- script/generate_docs.rb
|
179
|
+
- script/host_wrapper.bat
|
180
|
+
- script/host_wrapper.sh
|
176
181
|
- script/j2mp.rb
|
177
182
|
- script/mp2j.rb
|
178
183
|
- script/run_acceptance.rb
|
179
184
|
- spec/acceptance/client_info_spec.vim
|
185
|
+
- spec/acceptance/remote_module_spec.vim
|
180
186
|
- spec/acceptance/rplugin_autocmd_spec.vim
|
181
187
|
- spec/acceptance/rplugin_command_spec.vim
|
182
188
|
- spec/acceptance/rplugin_function_spec.vim
|
@@ -195,7 +201,9 @@ files:
|
|
195
201
|
- spec/acceptance/rubyfile/set_pwd_after.rb
|
196
202
|
- spec/acceptance/rubyfile/set_pwd_before.rb
|
197
203
|
- spec/acceptance/rubyfile_spec.vim
|
204
|
+
- spec/acceptance/runtime/example_remote_module.rb
|
198
205
|
- spec/acceptance/runtime/init.vim
|
206
|
+
- spec/acceptance/runtime/plugin/example_remote_module.lua
|
199
207
|
- spec/acceptance/runtime/rplugin/ruby/autocmds.rb
|
200
208
|
- spec/acceptance/runtime/rplugin/ruby/commands.rb
|
201
209
|
- spec/acceptance/runtime/rplugin/ruby/functions.rb
|
@@ -228,7 +236,7 @@ homepage: https://github.com/neovim/neovim-ruby
|
|
228
236
|
licenses:
|
229
237
|
- MIT
|
230
238
|
metadata: {}
|
231
|
-
post_install_message:
|
239
|
+
post_install_message:
|
232
240
|
rdoc_options: []
|
233
241
|
require_paths:
|
234
242
|
- lib
|
@@ -243,12 +251,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
251
|
- !ruby/object:Gem::Version
|
244
252
|
version: '0'
|
245
253
|
requirements: []
|
246
|
-
rubygems_version: 3.
|
247
|
-
signing_key:
|
254
|
+
rubygems_version: 3.3.7
|
255
|
+
signing_key:
|
248
256
|
specification_version: 4
|
249
257
|
summary: A Ruby client for Neovim
|
250
258
|
test_files:
|
251
259
|
- spec/acceptance/client_info_spec.vim
|
260
|
+
- spec/acceptance/remote_module_spec.vim
|
252
261
|
- spec/acceptance/rplugin_autocmd_spec.vim
|
253
262
|
- spec/acceptance/rplugin_command_spec.vim
|
254
263
|
- spec/acceptance/rplugin_function_spec.vim
|
@@ -267,7 +276,9 @@ test_files:
|
|
267
276
|
- spec/acceptance/rubyfile/set_pwd_after.rb
|
268
277
|
- spec/acceptance/rubyfile/set_pwd_before.rb
|
269
278
|
- spec/acceptance/rubyfile_spec.vim
|
279
|
+
- spec/acceptance/runtime/example_remote_module.rb
|
270
280
|
- spec/acceptance/runtime/init.vim
|
281
|
+
- spec/acceptance/runtime/plugin/example_remote_module.lua
|
271
282
|
- spec/acceptance/runtime/rplugin/ruby/autocmds.rb
|
272
283
|
- spec/acceptance/runtime/rplugin/ruby/commands.rb
|
273
284
|
- spec/acceptance/runtime/rplugin/ruby/functions.rb
|
/data/{VimFlavor → Flavorfile}
RENAMED
File without changes
|