@@ -56,11 +56,7 @@ 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-
63- let l: matches = s: MatchResultFilterPipe (a: plugin_name , l: matches )
59+ let l: matches = s: MatchResultFilterPipe (a: plugin_name , l: matches , l: ctx )
6460 call easycomplete#complete (a: plugin_name , l: ctx , l: startcol , l: matches )
6561endfunction
6662
@@ -73,7 +69,7 @@ function! s:GetLspCompletionResult(server_name, data, plugin_name) abort
7369 return {' matches' : l: completion_result [' items' ], ' incomplete' : l: completion_result [' incomplete' ] }
7470endfunction
7571
76- function ! s: MatchResultFilterPipe (plugin_name, matches)
72+ function ! s: MatchResultFilterPipe (plugin_name, matches, ctx )
7773 let lsp_ctx = easycomplete#GetCurrentLspContext ()
7874 if type (get (lsp_ctx, " constructor" )) != type (' ' )
7975 let fn_name = a: plugin_name
@@ -85,7 +81,7 @@ function! s:MatchResultFilterPipe(plugin_name, matches)
8581 if ! easycomplete#util#FuncExists (Fun_name)
8682 return a: matches
8783 endif
88- return call (funcref (Fun_name), [a: matches ])
84+ return call (funcref (Fun_name), [a: matches, a: ctx ])
8985endfunction
9086
9187function ! s: console (... )
0 commit comments