mirror of
				https://github.com/dcarrillo/dotfiles.git
				synced 2025-11-03 23:19:09 +00:00 
			
		
		
		
	[neovim] Show warnings about larger files in a popup
This commit is contained in:
		@@ -51,7 +51,7 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
 | 
				
			|||||||
			vim.cmd("IBLDisable")
 | 
								vim.cmd("IBLDisable")
 | 
				
			||||||
			vim.cmd("LspStop")
 | 
								vim.cmd("LspStop")
 | 
				
			||||||
			if ts_was_active then
 | 
								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
 | 
							end
 | 
				
			||||||
	end,
 | 
						end,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,5 +35,17 @@ require("noice").setup({
 | 
				
			|||||||
			},
 | 
								},
 | 
				
			||||||
			opts = { skip = true },
 | 
								opts = { skip = true },
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								view = "popup",
 | 
				
			||||||
 | 
								filter = {
 | 
				
			||||||
 | 
									find = "File larger than",
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								opts = {
 | 
				
			||||||
 | 
									size = {
 | 
				
			||||||
 | 
										width = 100,
 | 
				
			||||||
 | 
										height = 4,
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user