Class: Solargraph::LanguageServer::Message::TextDocument::SignatureHelp

Inherits:
TextDocument::Base
  • Object
show all
Defined in:
lib/solargraph/language_server/message/text_document/signature_help.rb

Instance Method Summary collapse

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/solargraph/language_server/message/text_document/signature_help.rb', line 8

def process
  line = params['position']['line']
  col = params['position']['character']
  suggestions = host.signatures_at(params['textDocument']['uri'], line, col)
  set_result({
               signatures: suggestions.flat_map(&:signature_help)
             })
rescue FileNotFoundError => e
  Logging.logger.warn "[#{e.class}] #{e.message}"
  # @sg-ignore Need to add nil check here
  Logging.logger.warn e.backtrace.join("\n")
  set_result nil
end