Call command after edit (#734)

codeAction may contains edit and command both

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
This commit is contained in:
mattn
2020-03-01 00:42:48 +09:00
committed by GitHub
parent 3d4daa4d34
commit 5537feca35

View File

@@ -102,9 +102,10 @@ function! s:handle_one_code_action(server_name, sync, command_or_code_action) ab
" has WorkspaceEdit.
if has_key(a:command_or_code_action, 'edit')
call lsp#utils#workspace_edit#apply_workspace_edit(a:command_or_code_action['edit'])
endif
" Command.
elseif has_key(a:command_or_code_action, 'command') && type(a:command_or_code_action['command']) == type('')
if has_key(a:command_or_code_action, 'command') && type(a:command_or_code_action['command']) == type('')
call lsp#send_request(a:server_name, {
\ 'method': 'workspace/executeCommand',
\ 'params': a:command_or_code_action,