Class: Solargraph::LanguageServer::Message::Extended::Search

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/language_server/message/extended/search.rb

Instance Attribute Summary

Attributes inherited from Base

#error, #host, #id, #method, #params, #request, #result

Instance Method Summary collapse

Methods inherited from Base

#initialize, #post_initialize, #send_response, #set_error, #set_result

Constructor Details

This class inherits a constructor from Solargraph::LanguageServer::Message::Base

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
# File 'lib/solargraph/language_server/message/extended/search.rb', line 8

def process
  results = host.search(params['query'])
  page = Solargraph::Page.new(host.options['viewsPath'])
  content = page.render('search', layout: true, locals: {query: params['query'], results: results})
  set_result(
    content: content
  )
end