Class: TypeProf::LSP::Message::TextDocument::References
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::TypeProf::LSP::Message
|
|
Instance Chain:
self,
::TypeProf::LSP::Message
|
|
Inherits: |
TypeProf::LSP::Message
|
Defined in: | lib/typeprof/lsp.rb |
Constant Summary
-
METHOD =
# File 'lib/typeprof/lsp.rb', line 646"textDocument/references"
::TypeProf::LSP::Message
- Inherited
Class Method Summary
::TypeProf::LSP::Message
- Inherited
Instance Method Summary
Constructor Details
This class inherits a constructor from TypeProf::LSP::Message
Instance Method Details
#run
[ GitHub ]# File 'lib/typeprof/lsp.rb', line 647
def run case @params in { textDocument: { uri:, }, position: loc, } else raise end caller_table = @server.open_texts[uri]&.caller_table code_locations = caller_table[CodeLocation.from_lsp(loc)] if caller_table if code_locations respond( code_locations.map do |path, code_range| { uri: "file://" + path, range: code_range.to_lsp, } end ) else respond(nil) end end