Class: TypeProf::LSP::Message::Workspace::ExecuteCommand
- Inherits:
-
TypeProf::LSP::Message
- Object
- TypeProf::LSP::Message
- TypeProf::LSP::Message::Workspace::ExecuteCommand
- Defined in:
- lib/typeprof/lsp/messages.rb
Overview
workspace/didChangeWatchedFiles notification
Constant Summary collapse
- METHOD =
request
"workspace/executeCommand"
Constants inherited from TypeProf::LSP::Message
Instance Method Summary collapse
Methods inherited from TypeProf::LSP::Message
build_table, find, inherited, #initialize, #log, #notify, #respond, #respond_error
Constructor Details
This class inherits a constructor from TypeProf::LSP::Message
Instance Method Details
#run ⇒ Object
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/typeprof/lsp/messages.rb', line 385 def run case @params[:command] when "typeprof.enableSignature" @server.signature_enabled = true @server.send_request("workspace/codeLens/refresh") respond(nil) when "typeprof.disableSignature" @server.signature_enabled = false @server.send_request("workspace/codeLens/refresh") respond(nil) when "typeprof.createPrototypeRBS" uri, row, col, str = @params[:arguments] @server.send_request( "workspace/applyEdit", edit: { changes: { uri => [{ range: TypeProf::CodeRange[row, col, row, col].to_lsp, newText: "#: #{ str }\n" + " " * col, }], }, }, ) do |res, err| end respond(nil) end end |