8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/jade/lsp/handlers.rb', line 8
def dispatch(state, message)
case message['method']
when 'initialize' then on_initialize(state, message)
when 'initialized' then [state, []]
when 'shutdown' then [state, [respond(message['id'], nil)]]
when 'exit' then [state, []]
when 'textDocument/didOpen' then on_did_open(state, message['params'])
when 'textDocument/didChange' then on_did_change(state, message['params'])
when 'textDocument/didSave' then [state, []]
when 'textDocument/didClose' then on_did_close(state, message['params'])
when 'textDocument/documentSymbol' then on_document_symbol(state, message)
when 'textDocument/hover' then on_hover(state, message)
when 'textDocument/definition' then on_definition(state, message)
when 'textDocument/references' then on_references(state, message)
when 'textDocument/completion' then on_completion(state, message)
when 'textDocument/prepareRename' then on_prepare_rename(state, message)
when 'textDocument/rename' then on_rename(state, message)
when 'textDocument/inlayHint' then on_inlay_hint(state, message)
when 'textDocument/formatting' then on_formatting(state, message)
else on_unknown(state, message)
end
end
|