Class: Neovim::Provider
Constant Summary
Constants included from Logging
Logging::DEFAULT_LEVEL, Logging::LEVELS
Class Method Summary collapse
Methods inherited from Remote
#client_methods, #client_name, #client_type, #initialize, #notify, open, open_conn, #request, #run, #start, start_client
Methods included from Logging
Constructor Details
This class inherits a constructor from Neovim::Remote
Class Method Details
.run(plugins) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/neovim/host.rb', line 21 def run plugins $stdin.tty? and raise "This program expects to be called by Neovim. It can't run interactively." start plugins do |h| h.run nil rescue Remote::Disconnected log :fatal, "Disconnected" nil rescue SignalException n = $!.signm log :fatal, "Signal was caught: #{n}" (n =~ /\A(?:SIG)?TERM\z/) ? 0 : 1 rescue Exception log_exception :fatal 2 end end |
.start(plugins) ⇒ Object
15 16 17 18 19 |
# File 'lib/neovim/host.rb', line 15 def start plugins super plugins, ConnectionStdio do |h| yield h end end |