Class: Neovim::Host
Constant Summary
Constants included from Logging
Logging::DEFAULT_LEVEL, Logging::LEVELS
Instance Method Summary collapse
-
#initialize(plugins, conn) ⇒ Host
constructor
A new instance of Host.
Methods inherited from Provider
Methods inherited from Remote
#client_methods, #client_name, #client_type, #notify, open, open_conn, #request, #run, #start, start, start_client
Methods included from Logging
Constructor Details
#initialize(plugins, conn) ⇒ Host
Returns a new instance of Host.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/neovim/host.rb', line 45 def initialize plugins, conn super plugins, conn @plugins[ :base] = DslPlain.open do |dsl| dsl.plain "poll" do start @plugins.each_value { |p| p.setup @conn.client } "ok" end dsl.plain "specs", nargs: 1 do |source| p = @plugins[ source] p or raise "Unknown plugin #{source}" p.specs end dsl.plain "nvim_error_event", nargs: 2 do |errid,msg| raise "#{@conn.error errid} from Neovim: #{msg}" end end end |