fix lightbulb
This commit is contained in:
@ -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,
|
||||||
|
@ -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 },
|
||||||
|
Reference in New Issue
Block a user