Class: Yoda::Server::Providers::TextDocumentDidOpen

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/server/providers/text_document_did_open.rb

Instance Attribute Summary

Attributes inherited from Base

#notifier, #session

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, provide?, #timeout

Constructor Details

This class inherits a constructor from Yoda::Server::Providers::Base

Class Method Details

.provider_methodObject



5
6
7
# File 'lib/yoda/server/providers/text_document_did_open.rb', line 5

def self.provider_method
  :'textDocument/didOpen'
end

Instance Method Details

#provide(params) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/yoda/server/providers/text_document_did_open.rb', line 9

def provide(params)
  uri = params[:text_document][:uri]
  text = params[:text_document][:text]
  session.store_source(uri: uri, source: text)

  NO_RESPONSE
end