File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ To toggle auto trigger for the current buffer, use `require("copilot.suggestion"
134134
135135Copilot suggestion is automatically hidden when ` popupmenu-completion ` is open. In case you use a custom
136136menu for completion, you can set the ` copilot_suggestion_hidden ` buffer variable to ` true ` to have the
137- same behavior. For example, with ` nvim-cmp ` :
137+ same behavior.
138+
139+ <details >
140+ <summary >Example using nvim-cmp</summary >
138141
139142``` lua
140143cmp .event :on (" menu_opened" , function ()
@@ -145,6 +148,29 @@ cmp.event:on("menu_closed", function()
145148 vim .b .copilot_suggestion_hidden = false
146149end )
147150```
151+ </details >
152+
153+ <details >
154+ <summary >Example using blink.cmp</summary >
155+
156+ ``` lua
157+ vim .api .nvim_create_autocmd (" User" , {
158+ pattern = " BlinkCmpMenuOpen" ,
159+ callback = function ()
160+ vim .b .copilot_suggestion_hidden = true
161+ end ,
162+ })
163+
164+ vim .api .nvim_create_autocmd (" User" , {
165+ pattern = " BlinkCmpMenuClose" ,
166+ callback = function ()
167+ vim .b .copilot_suggestion_hidden = false
168+ end ,
169+ })
170+
171+ ```
172+ </details >
173+
148174
149175The ` copilot.suggestion ` module exposes the following functions:
150176
You can’t perform that action at this time.
0 commit comments