File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
local signature = {}
2
2
3
3
function signature .setup ()
4
- local trigger = require (' blink.cmp.signature.trigger' ).activate ()
5
- local window = require (' blink.cmp.signature.window' ).setup ()
4
+ local trigger = require (' blink.cmp.signature.trigger' )
5
+ trigger .activate ()
6
+ local window = require (' blink.cmp.signature.window' )
6
7
7
8
local sources = require (' blink.cmp.sources.lib' )
8
9
9
- trigger .listen_on_show (function (context )
10
+ trigger .show_emitter :on (function (event )
11
+ local context = event .context
10
12
sources .cancel_signature_help ()
11
13
sources .get_signature_help (context , function (signature_help )
12
14
if signature_help ~= nil and trigger .context ~= nil and trigger .context .id == context .id then
@@ -17,7 +19,7 @@ function signature.setup()
17
19
end
18
20
end )
19
21
end )
20
- trigger .listen_on_hide (function () window .close () end )
22
+ trigger .hide_emitter : on (function () window .close () end )
21
23
end
22
24
23
25
return signature
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ local signature = {
27
27
}
28
28
29
29
-- todo: deduplicate this
30
- menu .position_update_emitter :on (function () signature .update_position (signature . context ) end )
30
+ menu .position_update_emitter :on (function () signature .update_position () end )
31
31
vim .api .nvim_create_autocmd ({ ' CursorMovedI' , ' WinScrolled' , ' WinResized' }, {
32
32
callback = function ()
33
- if signature .context then signature .update_position (signature . context ) end
33
+ if signature .context then signature .update_position () end
34
34
end ,
35
35
})
36
36
You can’t perform that action at this time.
0 commit comments