Sha256: eadbc639e9bda93fc9483d8a3bff7556af076a133e7510200c5c977edcaac00e
Contents?: true
Size: 1.02 KB
Versions: 17
Compression:
Stored size: 1.02 KB
Contents
module Steep module Server module Utils LSP = LanguageServer::Protocol def source_path(uri) project.relative_path(Pathname(uri.path)) end def update_source(request) path = source_path(URI.parse(request[:params][:textDocument][:uri])) text = request[:params][:contentChanges][0][:text] version = request[:params][:textDocument][:version] Steep.logger.debug "Updateing source: path=#{path}, version=#{version}, size=#{text.bytesize}" project.targets.each do |target| case when target.source_file?(path) target.update_source path, text when target.possible_source_file?(path) target.add_source path, text when target.signature_file?(path) target.update_signature path, text when target.possible_signature_file?(path) target.add_signature path, text end end if block_given? yield path, version end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems