Skip to content

Commit

Permalink
Nvim: disable nvim-cmp on large files
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 12, 2024
1 parent 78456ce commit 2dbd14d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .config/nvim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ local function disable_plugins_for_large_files()
if filetype ~= "" then
vim.cmd("TSBufDisable " .. filetype)
end

-- Disable nvim-cmp
local cmp = require("cmp")
if cmp then
cmp.setup.buffer({ enabled = false })
end

vim.api.nvim_echo({
{ "Plugins disabled for large file: " .. filepath, "WarningMsg" },
}, false, {})
end
end

Expand Down

0 comments on commit 2dbd14d

Please sign in to comment.