Skip to content

Commit cb91755

Browse files
authored
Merge pull request #3555 from bhcleek/lsp/code-action
lsp: allow codeActions to results to not have an edit property
2 parents c6cf8b9 + b9fda8f commit cb91755

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/go/lsp.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -1794,10 +1794,6 @@ function! s:handleCodeAction(kind, cmd, msg) abort dict
17941794

17951795
for l:item in a:msg
17961796
if get(l:item, 'kind', '') is a:kind
1797-
if !has_key(l:item, 'edit')
1798-
continue
1799-
endif
1800-
18011797
if has_key(l:item, 'disabled') && get(l:item.disabled, 'reason', '') isnot ''
18021798
call go#util#EchoWarning(printf('code action is disabled: %s', l:item.disabled.reason))
18031799
continue
@@ -1810,6 +1806,10 @@ function! s:handleCodeAction(kind, cmd, msg) abort dict
18101806
endif
18111807
endif
18121808

1809+
if !has_key(l:item, 'edit')
1810+
continue
1811+
endif
1812+
18131813
if !has_key(l:item.edit, 'documentChanges')
18141814
continue
18151815
endif

0 commit comments

Comments
 (0)