neovim 0.7.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/docs.yml +39 -0
  3. data/.github/workflows/tests.yml +64 -0
  4. data/.gitignore +2 -0
  5. data/CHANGELOG.md +22 -0
  6. data/CODE_OF_CONDUCT.md +3 -3
  7. data/README.md +19 -20
  8. data/Rakefile +21 -11
  9. data/exe/neovim-ruby-host +5 -0
  10. data/lib/neovim/buffer.rb +120 -41
  11. data/lib/neovim/client.rb +304 -39
  12. data/lib/neovim/client_info.rb +46 -0
  13. data/lib/neovim/connection.rb +7 -2
  14. data/lib/neovim/event_loop.rb +8 -4
  15. data/lib/neovim/host/cli.rb +41 -0
  16. data/lib/neovim/host.rb +3 -0
  17. data/lib/neovim/logging.rb +1 -1
  18. data/lib/neovim/message.rb +1 -1
  19. data/lib/neovim/plugin/dsl.rb +6 -0
  20. data/lib/neovim/plugin.rb +7 -2
  21. data/lib/neovim/remote_object.rb +5 -2
  22. data/lib/neovim/ruby_provider/object_ext.rb +5 -0
  23. data/lib/neovim/ruby_provider/vim.rb +6 -5
  24. data/lib/neovim/ruby_provider.rb +29 -10
  25. data/lib/neovim/session.rb +21 -16
  26. data/lib/neovim/tabpage.rb +8 -15
  27. data/lib/neovim/version.rb +1 -1
  28. data/lib/neovim/window.rb +45 -33
  29. data/lib/neovim.rb +12 -3
  30. data/neovim.gemspec +4 -5
  31. data/script/ci/download_nvim.sh +40 -0
  32. data/script/dump_api.rb +1 -1
  33. data/script/generate_docs.rb +6 -7
  34. data/script/run_acceptance.rb +15 -11
  35. data/spec/acceptance/client_info_spec.vim +42 -0
  36. data/spec/acceptance/rplugin_command_spec.vim +2 -2
  37. data/spec/acceptance/ruby_spec.vim +18 -11
  38. data/spec/acceptance/rubydo_spec.vim +9 -0
  39. data/spec/acceptance/rubyeval_spec.vim +22 -0
  40. data/spec/acceptance/rubyfile/curbuf_ivar_get.rb +1 -1
  41. data/spec/acceptance/rubyfile/curbuf_ivar_set.rb +1 -1
  42. data/spec/acceptance/rubyfile/define_foo.rb +1 -1
  43. data/spec/acceptance/rubyfile/nested_inner.rb +1 -1
  44. data/spec/acceptance/rubyfile/set_pwd_after.rb +1 -1
  45. data/spec/acceptance/rubyfile/set_pwd_before.rb +1 -1
  46. data/spec/acceptance/rubyfile_spec.vim +19 -19
  47. data/spec/acceptance/runtime/init.vim +2 -2
  48. data/spec/acceptance/runtime/rplugin/ruby/commands.rb +2 -2
  49. data/spec/helper.rb +25 -7
  50. data/spec/neovim/api_spec.rb +1 -1
  51. data/spec/neovim/buffer_spec.rb +10 -6
  52. data/spec/neovim/client_info_spec.rb +77 -0
  53. data/spec/neovim/client_spec.rb +9 -2
  54. data/spec/neovim/connection_spec.rb +32 -4
  55. data/spec/neovim/current_spec.rb +1 -2
  56. data/spec/neovim/event_loop_spec.rb +16 -0
  57. data/spec/neovim/host/cli_spec.rb +94 -0
  58. data/spec/neovim/host_spec.rb +16 -14
  59. data/spec/neovim/line_range_spec.rb +1 -3
  60. data/spec/neovim/remote_object_spec.rb +1 -2
  61. data/spec/neovim/ruby_provider/buffer_ext_spec.rb +6 -7
  62. data/spec/neovim/ruby_provider/object_ext_spec.rb +10 -0
  63. data/spec/neovim/ruby_provider/vim_spec.rb +1 -1
  64. data/spec/neovim/ruby_provider/window_ext_spec.rb +7 -10
  65. data/spec/neovim/session_spec.rb +13 -40
  66. data/spec/neovim/window_spec.rb +1 -1
  67. data/spec/neovim_spec.rb +28 -51
  68. data/spec/support.rb +27 -1
  69. metadata +26 -44
  70. data/.coveralls.yml +0 -1
  71. data/.rubocop.yml +0 -118
  72. data/.travis.yml +0 -22
  73. data/appveyor.yml +0 -31
  74. data/bin/neovim-ruby-host +0 -18
  75. data/script/validate_docs.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 97582ab6b5d7a61143cc0d0e3e1a5ffec8b6c292
4
- data.tar.gz: 1b6c5905f2c870f4fd77490a144a32337f0eef11
2
+ SHA256:
3
+ metadata.gz: 6261883caf16dbd51bb9b1a869b61cf71597615e32c51af87727ea25b90f8fcd
4
+ data.tar.gz: 33053c2596c20db1e6314ff38c23f3ca091d994736c9852a45fc3237dcdcdba2
5
5
  SHA512:
6
- metadata.gz: 01f995a41e2ece2e05228762b8e0d9ca36428bbf6bf896eb388e19b34869ede4d972395d5300381e4f4706e0426bafc6f82f0abd053aab4fa157b232db190f15
7
- data.tar.gz: e55008b53e7d042c631032455be96e81715256b1c2763c98f23a7891b44b89e88c1e4a449232bba9716a280844766c03666e346bc2943e6b025b9fc12a6234e8
6
+ metadata.gz: 8ab4995d175c7dd2821bf547b43c4b2128ee332c5110d59698e419352d325ec94ff761cda257d8bd4612f2f3c3c868c59fcaf947f923c0c1b98ae1d83c88991c
7
+ data.tar.gz: 996aef5dece8afdf5306a9b716545793dd16d469f869c0d17eb336fc58ce91bf9154e234f42e5e0aab5c2b56e9025a8a5e2c86edbd48e5a7cb459b790252769e
@@ -0,0 +1,39 @@
1
+ name: Docs
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ schedule:
6
+ - cron: '0 0 * * 0'
7
+ jobs:
8
+ docs:
9
+ runs-on: ubuntu-latest
10
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
11
+ permissions:
12
+ contents: write
13
+ pull-requests: write
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ with:
17
+ repository: neovim/neovim-ruby
18
+ - uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: head
21
+ - name: Bundle install
22
+ run: |
23
+ bundle config set path vendor/bundle
24
+ bundle install --jobs 3 --retry 3
25
+ - name: Install Neovim
26
+ env:
27
+ BUILD: latest
28
+ run: bundle exec rake ci:download_nvim
29
+ - name: Generate docs
30
+ env:
31
+ NVIM_EXECUTABLE: "_nvim/bin/nvim"
32
+ run: bundle exec rake docs:generate
33
+ - name: Open pull request
34
+ uses: peter-evans/create-pull-request@v3
35
+ with:
36
+ token: ${{ secrets.GITHUB_TOKEN }}
37
+ commit-message: "[skip ci] Update generated docs"
38
+ author: Docs Workflow <noreply@github.com>
39
+ title: "Update generated docs"
@@ -0,0 +1,64 @@
1
+ name: Tests
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+ schedule:
8
+ - cron: '0 0 * * 0'
9
+ jobs:
10
+ linux_osx:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ ruby: [2.5, 2.6, 2.7, 3.0, head]
16
+ runs-on: ${{ matrix.os }}
17
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ with:
21
+ repository: neovim/neovim-ruby
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - name: Bundle install
26
+ run: |
27
+ bundle config set path vendor/bundle
28
+ bundle install --jobs 3 --retry 3
29
+ - name: Install Neovim
30
+ env:
31
+ BUILD: nightly
32
+ run: bundle exec rake ci:download_nvim
33
+ - name: Run tests
34
+ env:
35
+ NVIM_EXECUTABLE: "_nvim/bin/nvim"
36
+ run: bundle exec rake spec
37
+ windows:
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ ruby: [2.5, 2.6, 2.7, 3.0]
42
+ runs-on: windows-latest
43
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
44
+ steps:
45
+ - uses: actions/checkout@v2
46
+ with:
47
+ repository: neovim/neovim-ruby
48
+ - uses: ruby/setup-ruby@v1
49
+ with:
50
+ ruby-version: ${{ matrix.ruby }}
51
+ - name: Bundle install
52
+ run: |
53
+ bundle config set path vendor/bundle
54
+ bundle install --jobs 3 --retry 3
55
+ - name: Install Neovim
56
+ uses: crazy-max/ghaction-chocolatey@v1
57
+ with:
58
+ # TODO: Install `--pre` once nightly release is fixed:
59
+ # https://github.com/neovim/neovim/issues/13312
60
+ args: install neovim -fy --ignore-dependencies --ignore-checksums
61
+ - name: Run tests
62
+ env:
63
+ NVIM_EXECUTABLE: 'C:\tools\neovim\Neovim\bin\nvim'
64
+ run: bundle exec rake spec
data/.gitignore CHANGED
@@ -21,3 +21,5 @@ spec/workspace
21
21
  spec/acceptance/runtime/flavors
22
22
  spec/acceptance/runtime/rplugin_manifest.vim
23
23
  vendor/bundle
24
+ bin
25
+ .vim-flavor
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # 0.9.0
2
+
3
+ - Add RPC support for `:rubyeval`.
4
+ - Add `Neovim::Session#next`.
5
+ - Rename `Neovim::Session::Exited` -> `Neovim::Session::Disconnected`.
6
+
7
+ # 0.8.1
8
+
9
+ - Set client info on host and client startup
10
+ - Add `Client#channel_id`
11
+
12
+ # 0.8.0
13
+
14
+ - Allow `Buffer#append` to take a string with newlines
15
+ - Use non-strict line indexing in `:rubydo` to prevent line deletions from
16
+ throwing exceptions
17
+ - Performance optimizations:
18
+ - Cache RPC method lookups and store them in a set
19
+ - Only flush writes before reading in the event loop
20
+ - Delete request handlers after invoking them
21
+ - Refresh provider globals in a single RPC request
22
+
1
23
  # 0.7.1
2
24
 
3
25
  - Fix `uninitialized constant Neovim::RubyProvider::StringIO`
data/CODE_OF_CONDUCT.md CHANGED
@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
40
40
 
41
41
  ## Attribution
42
42
 
43
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
44
44
 
45
- [homepage]: http://contributor-covenant.org
46
- [version]: http://contributor-covenant.org/version/1/4/
45
+ [homepage]: https://contributor-covenant.org
46
+ [version]: https://contributor-covenant.org/version/1/4/
data/README.md CHANGED
@@ -1,30 +1,29 @@
1
1
  # Neovim Ruby
2
2
 
3
- [![Travis](https://travis-ci.org/alexgenco/neovim-ruby.svg?branch=master)](https://travis-ci.org/alexgenco/neovim-ruby)
4
- [![Build status](https://ci.appveyor.com/api/projects/status/wp7agvgcxxcguj6h/branch/master?svg=true)](https://ci.appveyor.com/project/alexgenco/neovim-ruby/branch/master)
5
- [![Coverage Status](https://coveralls.io/repos/alexgenco/neovim-ruby/badge.svg)](https://coveralls.io/r/alexgenco/neovim-ruby)
6
- [![Code Climate](https://codeclimate.com/github/alexgenco/neovim-ruby/badges/gpa.svg)](https://codeclimate.com/github/alexgenco/neovim-ruby)
3
+ [![Build Status](https://github.com/neovim/neovim-ruby/workflows/Tests/badge.svg)](https://github.com/neovim/neovim-ruby/actions)
7
4
  [![Gem Version](https://badge.fury.io/rb/neovim.svg)](https://badge.fury.io/rb/neovim)
8
- [![Dependency Status](https://gemnasium.com/badges/github.com/alexgenco/neovim-ruby.svg)](https://gemnasium.com/github.com/alexgenco/neovim-ruby)
9
- [![Inline docs](http://inch-ci.org/github/alexgenco/neovim-ruby.svg?branch=master)](http://inch-ci.org/github/alexgenco/neovim-ruby)
10
5
 
11
- Ruby bindings for [Neovim](https://github.com/neovim/neovim).
12
-
13
- *Warning*: This project follows [Semantic Versioning](http://semver.org/), thus its API should be considered unstable until it reaches v1.0.0 ([spec](http://semver.org/#spec-item-4)).
6
+ Ruby support for [Neovim](https://github.com/neovim/neovim).
14
7
 
15
8
  ## Installation
16
9
 
17
10
  Add this line to your application's Gemfile:
18
11
 
19
- gem "neovim"
12
+ ```ruby
13
+ gem "neovim"
14
+ ```
20
15
 
21
16
  And then execute:
22
17
 
23
- $ bundle
18
+ ```shell
19
+ bundle
20
+ ```
24
21
 
25
22
  Or install it yourself as:
26
23
 
27
- $ gem install neovim
24
+ ```shell
25
+ gem install neovim
26
+ ```
28
27
 
29
28
  ## Usage
30
29
 
@@ -41,7 +40,7 @@ require "neovim"
41
40
  client = Neovim.attach_unix("/tmp/nvim.sock")
42
41
  ```
43
42
 
44
- Refer to the [`Neovim` docs](http://www.rubydoc.info/github/alexgenco/neovim-ruby/master/Neovim) for other ways to connect to `nvim`, and the [`Neovim::Client` docs](http://www.rubydoc.info/github/alexgenco/neovim-ruby/master/Neovim/Client) for a summary of the client interface.
43
+ Refer to the [`Neovim` docs](https://www.rubydoc.info/github/neovim/neovim-ruby/main/Neovim) for other ways to connect to `nvim`, and the [`Neovim::Client` docs](https://www.rubydoc.info/github/neovim/neovim-ruby/main/Neovim/Client) for a summary of the client interface.
45
44
 
46
45
  ### Plugins
47
46
 
@@ -73,7 +72,7 @@ end
73
72
 
74
73
  When you add or update a plugin, you will need to call `:UpdateRemotePlugins` to update the remote plugin manifest. See `:help remote-plugin-manifest` for more information.
75
74
 
76
- Refer to the [`Neovim::Plugin::DSL` docs](http://www.rubydoc.info/github/alexgenco/neovim-ruby/master/Neovim/Plugin/DSL) for a more complete overview of the `Neovim.plugin` DSL.
75
+ Refer to the [`Neovim::Plugin::DSL` docs](https://www.rubydoc.info/github/neovim/neovim-ruby/main/Neovim/Plugin/DSL) for a more complete overview of the `Neovim.plugin` DSL.
77
76
 
78
77
  ### Vim Plugin Support
79
78
 
@@ -81,16 +80,16 @@ The Neovim gem also acts as a compatibility layer for Ruby plugins written for `
81
80
 
82
81
  ## Links
83
82
 
84
- * Source: <http://github.com/alexgenco/neovim-ruby>
85
- * Bugs: <http://github.com/alexgenco/neovim-ruby/issues>
86
- * CI: <http://travis-ci.org/alexgenco/neovim-ruby>
83
+ * Source: <https://github.com/neovim/neovim-ruby>
84
+ * Bugs: <https://github.com/neovim/neovim-ruby/issues>
85
+ * CI: <https://github.com/neovim/neovim-ruby/actions>
87
86
  * Documentation:
88
- * Latest Gem: <http://rubydoc.info/gems/neovim>
89
- * Master: <http://rubydoc.info/github/alexgenco/neovim-ruby/master/frames>
87
+ * Latest Gem: <https://rubydoc.info/gems/neovim>
88
+ * Main: <https://rubydoc.info/github/neovim/neovim-ruby/main/frames>
90
89
 
91
90
  ## Contributing
92
91
 
93
- 1. Fork it (http://github.com/alexgenco/neovim-ruby/fork)
92
+ 1. Fork it (<https://github.com/neovim/neovim-ruby/fork>)
94
93
  2. Create your feature branch (`git checkout -b my-new-feature`)
95
94
  3. Commit your changes (`git commit -am 'Add some feature'`)
96
95
  4. Push to the branch (`git push origin my-new-feature`)
data/Rakefile CHANGED
@@ -1,8 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
3
 
5
- RuboCop::RakeTask.new(:style)
4
+ Bundler.setup
6
5
 
7
6
  namespace :spec do
8
7
  desc "Run functional specs"
@@ -10,13 +9,13 @@ namespace :spec do
10
9
 
11
10
  desc "Run acceptance specs"
12
11
  task acceptance: "acceptance:deps" do
13
- run_script(:run_acceptance, "--reporter", "dot", "spec/acceptance")
12
+ run_script("run_acceptance.rb", "--reporter", "dot", "spec/acceptance")
14
13
  end
15
14
 
16
15
  namespace :acceptance do
17
16
  desc "Install acceptance spec dependencies"
18
17
  task :deps do
19
- sh "bundle exec vim-flavor update --vimfiles-path=spec/acceptance/runtime"
18
+ sh "vim-flavor update --vimfiles-path=spec/acceptance/runtime"
20
19
  end
21
20
  end
22
21
  end
@@ -24,17 +23,28 @@ end
24
23
  namespace :docs do
25
24
  desc "Generate Neovim remote API docs"
26
25
  task :generate do
27
- run_script(:generate_docs)
26
+ run_script("generate_docs.rb")
28
27
  end
28
+ end
29
29
 
30
- desc "Validate generated documentation is up-to-date"
31
- task :validate do
32
- run_script(:validate_docs)
30
+ namespace :ci do
31
+ task :download_nvim do
32
+ run_script("ci/download_nvim.sh")
33
33
  end
34
34
  end
35
35
 
36
- task default: [:style, "spec:functional", "spec:acceptance", "docs:validate"]
36
+ desc "Run specs"
37
+ task spec: [:"spec:functional", :"spec:acceptance"]
38
+
39
+ task default: :spec
37
40
 
38
- def run_script(script_name, *args)
39
- ruby File.expand_path("../script/#{script_name}.rb", __FILE__), *args
41
+ def run_script(relpath, *args)
42
+ path = File.expand_path("script/#{relpath}", __dir__)
43
+ cmd_handler = ->(ok, status) { ok || exit(status.exitstatus) }
44
+
45
+ if File.extname(path) == ".rb"
46
+ ruby(path, *args, &cmd_handler)
47
+ else
48
+ sh(path, *args, &cmd_handler)
49
+ end
40
50
  end
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "neovim/host/cli"
4
+
5
+ Neovim::Host::CLI.run(__FILE__, ARGV, STDIN, STDOUT, STDERR)
data/lib/neovim/buffer.rb CHANGED
@@ -4,7 +4,7 @@ require "neovim/line_range"
4
4
  module Neovim
5
5
  # Class representing an +nvim+ buffer.
6
6
  #
7
- # The methods documented here were generated using NVIM v0.2.2
7
+ # The methods documented here were generated using NVIM v0.5.0
8
8
  class Buffer < RemoteObject
9
9
  attr_reader :lines
10
10
 
@@ -91,7 +91,7 @@ module Neovim
91
91
  window = @session.request(:nvim_get_current_win)
92
92
  cursor = window.cursor
93
93
 
94
- set_lines(index, index, true, [str])
94
+ set_lines(index, index, true, [*str.split($/)])
95
95
  window.set_cursor(cursor)
96
96
  str
97
97
  end
@@ -135,112 +135,191 @@ module Neovim
135
135
 
136
136
  # The following methods are dynamically generated.
137
137
  =begin
138
- @method line_count(buffer)
138
+ @method line_count
139
139
  See +:h nvim_buf_line_count()+
140
- @param [Buffer] buffer
141
140
  @return [Integer]
142
141
 
143
- @method get_lines(buffer, start, end, strict_indexing)
142
+ @method attach(send_buffer, opts)
143
+ See +:h nvim_buf_attach()+
144
+ @param [Boolean] send_buffer
145
+ @param [Hash] opts
146
+ @return [Boolean]
147
+
148
+ @method detach
149
+ See +:h nvim_buf_detach()+
150
+ @return [Boolean]
151
+
152
+ @method get_lines(start, end, strict_indexing)
144
153
  See +:h nvim_buf_get_lines()+
145
- @param [Buffer] buffer
146
154
  @param [Integer] start
147
155
  @param [Integer] end
148
156
  @param [Boolean] strict_indexing
149
157
  @return [Array<String>]
150
158
 
151
- @method set_lines(buffer, start, end, strict_indexing, replacement)
159
+ @method set_lines(start, end, strict_indexing, replacement)
152
160
  See +:h nvim_buf_set_lines()+
153
- @param [Buffer] buffer
154
161
  @param [Integer] start
155
162
  @param [Integer] end
156
163
  @param [Boolean] strict_indexing
157
164
  @param [Array<String>] replacement
158
165
  @return [void]
159
166
 
160
- @method get_var(buffer, name)
167
+ @method set_text(start_row, start_col, end_row, end_col, replacement)
168
+ See +:h nvim_buf_set_text()+
169
+ @param [Integer] start_row
170
+ @param [Integer] start_col
171
+ @param [Integer] end_row
172
+ @param [Integer] end_col
173
+ @param [Array<String>] replacement
174
+ @return [void]
175
+
176
+ @method get_offset(index)
177
+ See +:h nvim_buf_get_offset()+
178
+ @param [Integer] index
179
+ @return [Integer]
180
+
181
+ @method get_var(name)
161
182
  See +:h nvim_buf_get_var()+
162
- @param [Buffer] buffer
163
183
  @param [String] name
164
184
  @return [Object]
165
185
 
166
- @method get_changedtick(buffer)
186
+ @method get_changedtick
167
187
  See +:h nvim_buf_get_changedtick()+
168
- @param [Buffer] buffer
169
188
  @return [Integer]
170
189
 
171
- @method get_keymap(buffer, mode)
190
+ @method get_keymap(mode)
172
191
  See +:h nvim_buf_get_keymap()+
173
- @param [Buffer] buffer
174
192
  @param [String] mode
175
193
  @return [Array<Hash>]
176
194
 
177
- @method set_var(buffer, name, value)
195
+ @method set_keymap(mode, lhs, rhs, opts)
196
+ See +:h nvim_buf_set_keymap()+
197
+ @param [String] mode
198
+ @param [String] lhs
199
+ @param [String] rhs
200
+ @param [Hash] opts
201
+ @return [void]
202
+
203
+ @method del_keymap(mode, lhs)
204
+ See +:h nvim_buf_del_keymap()+
205
+ @param [String] mode
206
+ @param [String] lhs
207
+ @return [void]
208
+
209
+ @method get_commands(opts)
210
+ See +:h nvim_buf_get_commands()+
211
+ @param [Hash] opts
212
+ @return [Hash]
213
+
214
+ @method set_var(name, value)
178
215
  See +:h nvim_buf_set_var()+
179
- @param [Buffer] buffer
180
216
  @param [String] name
181
217
  @param [Object] value
182
218
  @return [void]
183
219
 
184
- @method del_var(buffer, name)
220
+ @method del_var(name)
185
221
  See +:h nvim_buf_del_var()+
186
- @param [Buffer] buffer
187
222
  @param [String] name
188
223
  @return [void]
189
224
 
190
- @method get_option(buffer, name)
225
+ @method get_option(name)
191
226
  See +:h nvim_buf_get_option()+
192
- @param [Buffer] buffer
193
227
  @param [String] name
194
228
  @return [Object]
195
229
 
196
- @method set_option(buffer, name, value)
230
+ @method set_option(name, value)
197
231
  See +:h nvim_buf_set_option()+
198
- @param [Buffer] buffer
199
232
  @param [String] name
200
233
  @param [Object] value
201
234
  @return [void]
202
235
 
203
- @method get_number(buffer)
204
- See +:h nvim_buf_get_number()+
205
- @param [Buffer] buffer
206
- @return [Integer]
207
-
208
- @method get_name(buffer)
236
+ @method get_name
209
237
  See +:h nvim_buf_get_name()+
210
- @param [Buffer] buffer
211
238
  @return [String]
212
239
 
213
- @method set_name(buffer, name)
240
+ @method set_name(name)
214
241
  See +:h nvim_buf_set_name()+
215
- @param [Buffer] buffer
216
242
  @param [String] name
217
243
  @return [void]
218
244
 
219
- @method is_valid(buffer)
245
+ @method is_loaded
246
+ See +:h nvim_buf_is_loaded()+
247
+ @return [Boolean]
248
+
249
+ @method is_valid
220
250
  See +:h nvim_buf_is_valid()+
221
- @param [Buffer] buffer
222
251
  @return [Boolean]
223
252
 
224
- @method get_mark(buffer, name)
253
+ @method get_mark(name)
225
254
  See +:h nvim_buf_get_mark()+
226
- @param [Buffer] buffer
227
255
  @param [String] name
228
256
  @return [Array<Integer>]
229
257
 
230
- @method add_highlight(buffer, src_id, hl_group, line, col_start, col_end)
258
+ @method get_extmark_by_id(ns_id, id, opts)
259
+ See +:h nvim_buf_get_extmark_by_id()+
260
+ @param [Integer] ns_id
261
+ @param [Integer] id
262
+ @param [Hash] opts
263
+ @return [Array<Integer>]
264
+
265
+ @method get_extmarks(ns_id, start, end, opts)
266
+ See +:h nvim_buf_get_extmarks()+
267
+ @param [Integer] ns_id
268
+ @param [Object] start
269
+ @param [Object] end
270
+ @param [Hash] opts
271
+ @return [Array]
272
+
273
+ @method set_extmark(ns_id, line, col, opts)
274
+ See +:h nvim_buf_set_extmark()+
275
+ @param [Integer] ns_id
276
+ @param [Integer] line
277
+ @param [Integer] col
278
+ @param [Hash] opts
279
+ @return [Integer]
280
+
281
+ @method del_extmark(ns_id, id)
282
+ See +:h nvim_buf_del_extmark()+
283
+ @param [Integer] ns_id
284
+ @param [Integer] id
285
+ @return [Boolean]
286
+
287
+ @method add_highlight(ns_id, hl_group, line, col_start, col_end)
231
288
  See +:h nvim_buf_add_highlight()+
232
- @param [Buffer] buffer
233
- @param [Integer] src_id
289
+ @param [Integer] ns_id
234
290
  @param [String] hl_group
235
291
  @param [Integer] line
236
292
  @param [Integer] col_start
237
293
  @param [Integer] col_end
238
294
  @return [Integer]
239
295
 
240
- @method clear_highlight(buffer, src_id, line_start, line_end)
241
- See +:h nvim_buf_clear_highlight()+
242
- @param [Buffer] buffer
296
+ @method clear_namespace(ns_id, line_start, line_end)
297
+ See +:h nvim_buf_clear_namespace()+
298
+ @param [Integer] ns_id
299
+ @param [Integer] line_start
300
+ @param [Integer] line_end
301
+ @return [void]
302
+
303
+ @method set_virtual_text(src_id, line, chunks, opts)
304
+ See +:h nvim_buf_set_virtual_text()+
243
305
  @param [Integer] src_id
306
+ @param [Integer] line
307
+ @param [Array] chunks
308
+ @param [Hash] opts
309
+ @return [Integer]
310
+
311
+ @method call(fun)
312
+ See +:h nvim_buf_call()+
313
+ @param [LuaRef] fun
314
+ @return [Object]
315
+
316
+ @method get_number
317
+ See +:h nvim_buf_get_number()+
318
+ @return [Integer]
319
+
320
+ @method clear_highlight(ns_id, line_start, line_end)
321
+ See +:h nvim_buf_clear_highlight()+
322
+ @param [Integer] ns_id
244
323
  @param [Integer] line_start
245
324
  @param [Integer] line_end
246
325
  @return [void]