Class: TypeProf::LSP::Message::TextDocument::CodeLens
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/messages.rb |
Constant Summary
-
METHOD =
# File 'lib/typeprof/lsp/messages.rb', line 274"textDocument/codeLens"
::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/messages.rb', line 275
def run @params => { textDocument: { uri: } } text = @server.open_texts[uri] if !text || !@server.signature_enabled respond(nil) return end ret = [] @server.core.code_lens(text.path) do |code_range, title| pos = code_range.first ret << { range: TypeProf::CodeRange.new(pos, pos.right).to_lsp, command: { title: "#: " + title, command: "typeprof.createPrototypeRBS", arguments: [uri, code_range.first.lineno, code_range.first.column, title], }, } end respond(ret) end