From 8cb2e48406ef99f0efdb9723addcfe9c744a4550 Mon Sep 17 00:00:00 2001 From: Shaun Setlock Date: Wed, 2 Jul 2025 09:35:54 -0400 Subject: [PATCH] New autocomplete toggle config. --- nvim/lua/plugins/cmp.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nvim/lua/plugins/cmp.lua diff --git a/nvim/lua/plugins/cmp.lua b/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..8aeccc6 --- /dev/null +++ b/nvim/lua/plugins/cmp.lua @@ -0,0 +1,22 @@ +return { + "saghen/blink.cmp", + -- Make blink.cmp toogleable + opts = function(_, opts) + vim.b.completion = false + + Snacks.toggle({ + name = "Completion", + get = function() + return vim.b.completion + end, + set = function(state) + vim.b.completion = state + end, + }):map("uk") + + opts.enabled = function() + return vim.b.completion ~= false + end + return opts + end, +}