Class: Yoda::Server::Providers::TextDocumentDidChange

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/server/providers/text_document_did_change.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_change.rb', line 5

def self.provider_method
  :'textDocument/didChange'
end

Instance Method Details

#provide(params) ⇒ Object



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

def provide(params)
  uri = params[:text_document][:uri]
  text = params[:content_changes].first[:text]
  session.file_store.store(uri, text)

  NO_RESPONSE
end