Disabling Codeium in Neovim, especially if you're using a plugin manager like LazyVim, can be done through various methods, ranging from an interactive UI to direct configuration file edits. The most straightforward approach for LazyVim users involves its built-in plugin management interface.
Method 1: Disabling Codeium via LazyExtras UI (LazyVim)
If your Neovim setup is based on LazyVim, you can easily disable Codeium through its graphical plugin manager interface, LazyExtras UI. This method allows you to toggle plugins without directly editing configuration files.
Follow these steps:
- Restart Neovim: Close and reopen your Neovim instance.
- Access LazyExtras UI: When you see the LazyVim dashboard menu (the initial screen when Neovim starts), press
x
. This action will open the LazyExtras UI, which lists your installed plugins. - Navigate to Codeium: Use your cursor keys to scroll through the list of plugins. Locate the line that corresponds to Codeium, typically labeled as "coding. codeium" within the enabled plugins section.
- Disable Codeium: Once the cursor is on the "coding. codeium" line, press
x
. This will toggle its status from enabled to disabled. - Save and Reload: Follow any on-screen prompts to confirm your changes and reload Neovim. Codeium should now be disabled.
Method 2: Disabling Codeium via Plugin Configuration Files
For more direct control or if you are using a different plugin manager, you can disable Codeium by modifying its configuration file. This is a common and flexible approach for managing plugins in Neovim.
Using Lazy.nvim (or similar plugin managers)
If your Codeium configuration resides in a dedicated file (e.g., lua/plugins/codeium.lua
), you can add an enabled = false
flag to its plugin specification.
-
Locate Codeium's Configuration: Find the file where
Exafunction/codeium.nvim
is defined in your Neovim configuration. -
Add
enabled = false
: Insert theenabled = false
option directly into the plugin's return table.return { "Exafunction/codeium.nvim", enabled = false, -- Add this line to disable Codeium -- Other configurations for Codeium go here, e.g.: -- config = function() -- require("codeium").setup({}) -- end, }
-
Save and Reload: Save the configuration file. Then, restart Neovim or run your plugin manager's sync/clean command (e.g.,
:Lazy sync
for Lazy.nvim) to apply the changes.
Commenting Out the Configuration
A quick and simple way to temporarily disable Codeium is to comment out its entire plugin configuration block in your Neovim setup.
-
Locate Codeium's Configuration: Open the file where
Exafunction/codeium.nvim
is configured. -
Comment Out: Add comment markers (
--
for single lines, or--[[ ... --]]
for blocks in Lua) around the plugin definition.-- return { -- "Exafunction/codeium.nvim", -- config = function() -- require("codeium").setup({}) -- end, -- }
-
Restart Neovim: Close and reopen Neovim. The plugin will no longer be loaded.
Method 3: Temporarily Toggling Codeium Features
If you only wish to temporarily pause Codeium's suggestions without fully disabling the plugin or removing its configuration, Codeium itself often provides in-editor commands to toggle its functionality.
-
Check Codeium Commands: Refer to the official Codeium Neovim documentation for specific commands that can toggle its auto-completion or enable/disable status. Common commands might include
:Codeium Disable
or:Codeium Toggle
. -
Map a Keybinding: You can create a custom keybinding in your Neovim configuration to quickly toggle Codeium on and off. For example:
vim.keymap.set("n", "<leader>ct", function() require("codeium").toggle() -- Verify the exact toggle function in Codeium's API end, { desc = "Toggle Codeium Status" })
(Note: The
require("codeium").toggle()
function is an illustrative example; always consult the plugin's documentation for the correct API calls.)
Why You Might Disable Codeium
Users choose to disable AI coding assistants like Codeium for various reasons:
- Performance Optimization: To improve Neovim's startup time or overall responsiveness, especially if Codeium is perceived to be resource-intensive.
- Plugin Conflicts: If Codeium interferes with other completion engines (e.g., native LSP completion, GitHub Copilot) or other Neovim plugins.
- Focused Coding: To temporarily remove AI suggestions and focus purely on manual coding without external assistance.
- Switching AI Tools: When evaluating or transitioning to a different AI coding companion.
Re-enabling Codeium
Should you decide to use Codeium again, simply reverse the steps you took to disable it:
- LazyExtras UI: Re-enter the LazyExtras UI (press
x
from the dashboard), navigate to "coding. codeium" (which will now be in the disabled section), and pressx
again to re-enable it. - Configuration File: Remove the
enabled = false
line or uncomment the plugin configuration block. - Restart Neovim or run your plugin manager's sync command.