Class: PuppetLanguageServer::DisabledMessageHandler
Instance Attribute Summary
#protocol
Instance Method Summary
collapse
#handle, #unhandled_exception
#handle, #initialize
Instance Method Details
#notification_exit(_, _json_rpc_message) ⇒ Object
457
458
459
460
|
# File 'lib/puppet-languageserver/message_handler.rb', line 457
def notification_exit(_, _json_rpc_message)
PuppetLanguageServer.log_message(:info, 'Received exit notification. Closing connection to client...')
protocol.close_connection
end
|
#notification_initialized(_, _json_rpc_message) ⇒ Object
445
446
447
448
449
450
451
452
453
454
455
|
# File 'lib/puppet-languageserver/message_handler.rb', line 445
def notification_initialized(_, _json_rpc_message)
PuppetLanguageServer.log_message(:info, 'Client has received initialization')
protocol.encode_and_send(
::PuppetEditorServices::Protocol::JsonRPCMessages.new_notification(
'window/showMessage',
'type' => LSP::MessageType::WARNING,
'message' => 'An error occured while starting the Language Server. The server has been disabled.'
)
)
end
|
#request_initialize(_, _json_rpc_message) ⇒ Object
420
421
422
423
424
|
# File 'lib/puppet-languageserver/message_handler.rb', line 420
def request_initialize(_, _json_rpc_message)
PuppetLanguageServer.log_message(:debug, 'Received initialize method')
{ 'capabilities' => PuppetLanguageServer::ServerCapabilites.no_capabilities }
end
|
#request_puppet_getversion(_, _json_rpc_message) ⇒ Object
431
432
433
434
435
436
437
438
439
440
441
442
443
|
# File 'lib/puppet-languageserver/message_handler.rb', line 431
def request_puppet_getversion(_, _json_rpc_message)
LSP::PuppetVersion.new(
'languageServerVersion' => PuppetEditorServices.version,
'puppetVersion' => 'Unknown',
'facterVersion' => 'Unknown',
'factsLoaded' => true,
'functionsLoaded' => true,
'typesLoaded' => true,
'classesLoaded' => true
)
end
|
#request_shutdown(_, _json_rpc_message) ⇒ Object
426
427
428
429
|
# File 'lib/puppet-languageserver/message_handler.rb', line 426
def request_shutdown(_, _json_rpc_message)
PuppetLanguageServer.log_message(:debug, 'Received shutdown method')
nil
end
|