diff options
author | Khilseith <[email protected]> | 2023-03-20 04:54:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-19 21:54:41 -0700 |
commit | 57395bcc8a361d5976e08c09f814c13f37352584 (patch) | |
tree | 5425f481a8295ce37265afb0176a8971e8c6440b /lua | |
parent | f64294f768bbe4234d5d15fc689c06721f3bea26 (diff) |
fix: copilot indent reset (#3343) (#3960)
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lvim/core/cmp.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index c116f122..bb3eb7cb 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -331,6 +331,12 @@ M.config = function() if is_insert_mode() then -- prevent overwriting brackets confirm_opts.behavior = ConfirmBehavior.Insert end + local entry = cmp.get_selected_entry() + local is_copilot = entry and entry.source.name == "copilot" + if is_copilot then + confirm_opts.behavior = ConfirmBehavior.Replace + confirm_opts.select = true + end if cmp.confirm(confirm_opts) then return -- success, exit early end |