class TypeProf::LSP::Message::TextDocument::TypeDefinition
Constants
- METHOD
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 208 def run @params => { textDocument: { uri: }, position: pos, } text = @server.open_texts[uri] unless text respond(nil) return end defs = @server.type_definitions(text.path, TypeProf::CodePosition.from_lsp(pos)) if defs.empty? respond(nil) else respond(defs.map do |path, code_range| { uri: @server.path_to_uri(path), range: code_range.to_lsp, } end) end end