File: dump_api.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 (12 lines) | stat: -rwxr-xr-x 337 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env ruby

$:.unshift File.expand_path("../lib", __dir__)

require "neovim"
require "json"
require "pp"

nvim_exe = ENV.fetch("NVIM_EXECUTABLE", "nvim")
event_loop = Neovim::EventLoop.child([nvim_exe, "-u", "NONE", "-n"])
session = Neovim::Session.new(event_loop)
puts JSON.pretty_generate(session.request(:nvim_get_api_info))