This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

nvim: change cmp bindings

+13 -3
+13 -3
tools/nvim.nix
··· 265 265 "<C-e>" = "cmp.mapping.abort()"; 266 266 "<C-b>" = "cmp.mapping.scroll_docs(-4)"; 267 267 "<C-f>" = "cmp.mapping.scroll_docs(4)"; 268 - "<C-Space>" = "cmp.mapping.complete()"; 269 - "<CR>" = "cmp.mapping.confirm({ select = true })"; 270 - "<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; 268 + "<CR>" = '' 269 + cmp.mapping({ 270 + i = function(fallback) 271 + if cmp.visible() and cmp.get_active_entry() then 272 + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) 273 + else 274 + fallback() 275 + end 276 + end, 277 + s = cmp.mapping.confirm({ select = true }), 278 + c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), 279 + }) 280 + ''; 271 281 }; 272 282 }; 273 283 };