Skip to content

Commit 44953bc

Browse files
committed
bugfix for zig
1 parent 9cd9b08 commit 44953bc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

autoload/easycomplete/action/completion.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ function! s:HandleLspCallback(server_name, plugin_name, data) abort
5656
let l:matches = l:result['matches']
5757
let l:startcol = l:ctx['startcol']
5858

59+
if a:server_name == "zls"
60+
let l:matches = easycomplete#sources#zig#GetFullItems(l:matches)
61+
endif
62+
5963
let l:matches = s:MatchResultFilterPipe(a:plugin_name, l:matches)
6064
call easycomplete#complete(a:plugin_name, l:ctx, l:startcol, l:matches)
6165
endfunction

autoload/easycomplete/sources/zig.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ function! easycomplete#sources#zig#completor(opt, ctx) abort
1212
return easycomplete#DoLspComplete(a:opt, a:ctx)
1313
endfunction
1414

15+
function! easycomplete#sources#zig#GetFullItems(items)
16+
return a:items
17+
endfunction
18+
1519
function! easycomplete#sources#zig#GotoDefinition(...)
1620
return easycomplete#DoLspDefinition(["zig","zon"])
1721
endfunction

0 commit comments

Comments
 (0)