fix lightbulb

This commit is contained in:
Christian Nieves
2024-11-26 17:28:03 +00:00
parent b296094f42
commit 03c791b8d6
2 changed files with 1 additions and 20 deletions

View File

@ -56,26 +56,6 @@ return {
local lspkind = require("lspkind") local lspkind = require("lspkind")
lspkind.init() lspkind.init()
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local max_filesize = 100 * 1024 -- 100 KB
local fname = vim.api.nvim_buf_get_name(args.buf)
local ok, stats = pcall(vim.loop.fs_stat, fname)
if ok and stats and stats.size > max_filesize then
vim.schedule(function()
vim.notify(
string.format(
"Disabling nvim-cmp for buffer. File %s exceeds maximum configured size.",
fname
)
)
end)
require("cmp").setup.buffer({
enabled = false,
})
end
end,
})
cmp.setup.filetype("txt", { cmp.setup.filetype("txt", {
enabled = false, enabled = false,

View File

@ -21,6 +21,7 @@ return {
}, },
{ {
"kosayoda/nvim-lightbulb", "kosayoda/nvim-lightbulb",
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
event = { "LspAttach" }, event = { "LspAttach" },
opts = { opts = {
autocmd = { enabled = true }, autocmd = { enabled = true },