Class: Yoda::Server::Providers::WorkspaceDidCreateFiles

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

def self.provider_method
  :'workspace/didCreateFiles'
end

Instance Method Details

#provide(params) ⇒ Object

Parameters:

  • params (LanguageServer::Protocol::Interface::CreateFilesParams)


10
11
12
13
14
15
16
17
# File 'lib/yoda/server/providers/workspace_did_create_files.rb', line 10

def provide(params)
  files = params[:files]
  files.each do |file|
    session.read_source(file[:uri])
  end

  NO_RESPONSE
end