-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否存在能够取消补全的lua接口,或者类似的方式能够取消补全 #89
Comments
目前没有直接的API,绕一点的话可以通过 |
OK,谢谢回复,我试试 |
但是这个有问题,reset之后他会马上加载出来。 |
@luozhiya |
|
好的。 |
我找一个巧妙的方法可以实现我的需求,当存在 vim.cmd[[
inoremap <silent><expr> <C-c>
\ coc#pum#visible() ? coc#pum#cancel() :
\ luaeval('require("fittencode").has_suggestions()') ? '<cmd>lua require("fittencode.engines.inline").reset()<cr><cmd>Fitten disable_completions<cr>' : "\<C-c>"
inoremap <silent><expr> <c-space> luaeval('require("fittencode").has_suggestions()') ? "\<c-space>" : '<cmd>Fitten enable_completions<cr>'
]] |
#94 新加了API |
感谢,辛苦了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
由于个人习惯原因,我使用回车键作为补全的接受按键,因此当我需要输入回车而当前存在补全的时候,我输入回车会接受所有的补全,而我想知道能否有取消本次补全的接口(例如
copilot
中的copilot#Dismiss()
),这样我可以绑定<C-C>
来取消本次补全进而可以通过<CR>
来换行。The text was updated successfully, but these errors were encountered: