Module: Ibex::LSP::RequestHandlers
- Included in:
- Server
- Defined in:
- lib/ibex/lsp/request_handlers.rb,
sig/ibex/lsp/request_handlers.rbs
Overview
Dispatches the finite LSP surface to focused lifecycle, document, and navigation handlers.
Constant Summary collapse
- HANDLERS =
{ "initialize" => :initialize_workspace, "initialized" => :initialized_notification, "shutdown" => :shutdown_request, "exit" => :exit_notification, "textDocument/didOpen" => :did_open, "textDocument/didChange" => :did_change, "textDocument/didSave" => :did_save, "textDocument/didClose" => :did_close, "textDocument/definition" => :definition, "textDocument/references" => :references, "textDocument/prepareRename" => :prepare_rename, "textDocument/rename" => :rename, "textDocument/hover" => :hover, "textDocument/completion" => :completion, "$/cancelRequest" => :cancel_request }.freeze
Instance Method Summary collapse
Methods included from RequestSupport
#hash_member, #integer_member, #params_hash, #publish, #require_running!, #require_state!, #stale_publication?, #store, #string_member, #workspace
Methods included from NavigationHandlers
#completion, #definition, #hover, #prepare_rename, #references, #rename, #with_index
Methods included from DocumentHandlers
#did_change, #did_close, #did_open, #did_save
Methods included from InitializationHandlers
#capabilities, #exit_notification, #initialization_roots, #initialize_workspace, #initialized_notification, #shutdown_request
Instance Method Details
#cancel_request(_params) ⇒ nil
41 42 43 |
# File 'lib/ibex/lsp/request_handlers.rb', line 41 def cancel_request(_params) nil end |
#dispatch(method, params) ⇒ lsp_value?
33 34 35 36 37 38 |
# File 'lib/ibex/lsp/request_handlers.rb', line 33 def dispatch(method, params) handler = HANDLERS[method] raise ProtocolError.new("method not found: #{method}", code: -32_601) unless handler send(handler, params) end |