File: autocmds.rb

package info (click to toggle)
ruby-neovim 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: ruby: 4,178; sh: 23; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
Neovim.plugin do |plug|
  plug.autocmd(:BufEnter, pattern: "*.rb", sync: true) do |nvim|
    nvim.get_current_buf.set_var("rplugin_autocmd_BufEnter", true)
  end

  plug.autocmd(:BufEnter, pattern: "*.c", eval: "g:to_eval", sync: true) do |nvim, to_eval|
    nvim.set_var("rplugin_autocmd_BufEnter_eval", to_eval.merge(b: 43))
  end

  plug.autocmd(:BufEnter, pattern: "*.async") do |nvim, to_eval|
    nvim.set_var("rplugin_autocmd_BufEnter_async", true)
  end
end