diff options
| author | Igor Soarez <igor@soarez.org> | 2026-09-21 14:57:57 +0300 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-09-21 14:57:57 +0300 |
| commit | f671fb679b303e9f4de270414c008ad7129e6c25 (patch) | |
| tree | 13f0e15c7c659d818dc00f93392d4c732fce26ff /config/nvim/lua/plugins | |
| parent | b658c6231e888aedadd8568abbcf4c63c2a85d98 (diff) | |
supermaven off unless asked for; a blocked cask no longer ends install.sh
Supermaven was running everywhere. Its `condition` option reads the other way
round from what the code assumed -- `true` stops it -- so `return false` meant
"never stop", and the plugin loaded on InsertEnter, started its agent and
offered inline suggestions on every machine. Only blink's source for it was
off, which is what made it look disabled. It sends buffer context to a third
party, so it is now opt-in: DOT_SUPERMAVEN=1, in ~/.localenv where it is
wanted. Off, lazy keeps both plugins off disk entirely.
install.sh no longer stops at brew bundle either. A managed machine can refuse
a cask outright -- "disabled because it does not pass the macOS Gatekeeper
check" -- and brew bundle fails the whole run for one such entry, which left
the checkouts, nvim plugins and colour files undone. It warns and carries on;
brew has already named the entry.
Diffstat (limited to 'config/nvim/lua/plugins')
| -rw-r--r-- | config/nvim/lua/plugins/completion.lua | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/config/nvim/lua/plugins/completion.lua b/config/nvim/lua/plugins/completion.lua index fa037cd..2489fa2 100644 --- a/config/nvim/lua/plugins/completion.lua +++ b/config/nvim/lua/plugins/completion.lua @@ -1,3 +1,11 @@ +-- Supermaven sends buffer context to a third party, so no machine gets it +-- unless it asks: export DOT_SUPERMAVEN=1, in ~/.localenv on the machines that +-- want it. Off, `enabled = false` keeps the plugins off disk entirely, which +-- matters because the `condition` option below is supermaven-nvim's own and +-- reads the other way round -- `true` STOPS it, so the `return false` there +-- left it running on every machine, agent and inline suggestions included. +local supermaven_enabled = vim.env.DOT_SUPERMAVEN == "1" + local plugins = { -- Autocompletion and Snippets { @@ -11,9 +19,10 @@ local plugins = { }, sources = { -- Enable completion from lazydev, LSP, filesystem paths, snippets, buffer - -- (and optionally supermaven) - -- default = { "lazydev", "lsp", "path", "snippets", "buffer", "supermaven" }, - default = { "lazydev", "lsp", "path", "snippets", "buffer" }, + -- (and supermaven, where that machine opted in -- see the top) + default = supermaven_enabled + and { "lazydev", "lsp", "path", "snippets", "buffer", "supermaven" } + or { "lazydev", "lsp", "path", "snippets", "buffer" }, providers = { -- Neovim Lua API / plugin spec completions (folke/lazydev.nvim) lazydev = { @@ -28,7 +37,7 @@ local plugins = { }, -- lsp = { fallbacks = {} }, -- always show the buffer source supermaven = { - enabled = false, + enabled = supermaven_enabled, name = "supermaven", module = "blink-cmp-supermaven", async = true, @@ -101,6 +110,7 @@ local plugins = { -- Supermaven was acquired (and killed) by Cursor { "supermaven-inc/supermaven-nvim", + enabled = supermaven_enabled, event = "InsertEnter", opts = { keymaps = { @@ -132,6 +142,7 @@ local plugins = { }, { "huijiro/blink-cmp-supermaven", + enabled = supermaven_enabled, }, -- Lua LSP completion + types for the Neovim API and lazy plugin specs. |
