Adding back some blink completion settings. Toggle and ignore on Markdown files.
All checks were successful
Build and Push Docker Image / build-push (push) Successful in 12m36s

This commit is contained in:
Shaun Setlock
2026-01-19 20:58:29 -05:00
parent 9c24b28c50
commit c17e8163d9
2 changed files with 39 additions and 76 deletions

View File

@@ -0,0 +1,39 @@
return {
"saghen/blink.cmp",
---@param opts blink.cmp.Config
opts = function(_, opts)
-- Start with completion disabled in the current buffer.
-- Remove this line if you want it enabled by default.
vim.b.completion = false
-- Toggle completion per-buffer with <leader>uk
Snacks.toggle({
name = "Completion",
get = function()
-- treat anything except explicit false as "on"
return vim.b.completion ~= false
end,
set = function(state)
vim.b.completion = state
end,
}):map("<leader>uk")
-- Override Blink's global enabled() logic
opts.enabled = function()
-- 1) Hard-disable completion for markdown buffers
if vim.bo.filetype == "markdown" or vim.bo.filetype == "markdown.mdx" then
return false
end
-- 2) Keep Blink's default "no completion in prompt buffers"
if vim.bo.buftype == "prompt" then
return false
end
-- 3) Respect the per-buffer toggle
return vim.b.completion ~= false
end
return opts
end,
}