Class: Solargraph::LanguageServer::Message::Extended::Document

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/language_server/message/extended/document.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


6
7
8
9
10
11
12
13
# File 'lib/solargraph/language_server/message/extended/document.rb', line 6

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