[neovim] Show warnings about larger files in a popup

This commit is contained in:
Daniel Carrillo 2023-11-05 18:28:24 +01:00
parent b7ba811d1f
commit 66a3e25a2b
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 13 additions and 1 deletions

View File

@ -51,7 +51,7 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
vim.cmd("IBLDisable")
vim.cmd("LspStop")
if ts_was_active then
vim.notify("File larger than 1MB; syntax highlighting and heavy CPU use plugins turned off.")
vim.notify("File larger than 1MB; syntax highlighting and heavy CPU use plugins are turned off.")
end
end
end,

View File

@ -35,5 +35,17 @@ require("noice").setup({
},
opts = { skip = true },
},
{
view = "popup",
filter = {
find = "File larger than",
},
opts = {
size = {
width = 100,
height = 4,
},
},
},
},
})