mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-09 17:04:36 +02:00
perf: added support for LazyFile
event that properly loads file based plugins without blocking the ui
This commit is contained in:
parent
f15dd301e5
commit
936d74bb61
8 changed files with 58 additions and 14 deletions
|
@ -310,7 +310,7 @@ return {
|
|||
-- hunks in a commit.
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
|
@ -349,7 +349,7 @@ return {
|
|||
-- instances.
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
opts = {
|
||||
delay = 200,
|
||||
large_file_cutoff = 2000,
|
||||
|
@ -440,7 +440,7 @@ return {
|
|||
{
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
|
|
|
@ -45,6 +45,6 @@ return {
|
|||
{
|
||||
"Civitasv/cmake-tools.nvim",
|
||||
opts = {},
|
||||
event = "BufRead",
|
||||
event = "LazyFile",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = "BufReadPost",
|
||||
event = "LazyFile",
|
||||
opts = {
|
||||
-- Event to trigger linters
|
||||
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||
|
@ -43,7 +43,6 @@ return {
|
|||
end
|
||||
|
||||
function M.lint()
|
||||
local lint = require("lint")
|
||||
local names = lint.linters_by_ft[vim.bo.filetype] or {}
|
||||
local ctx = { filename = vim.api.nvim_buf_get_name(0) }
|
||||
ctx.dirname = vim.fn.fnamemodify(ctx.filename, ":h")
|
||||
|
|
|
@ -5,7 +5,7 @@ M.hl = {}
|
|||
|
||||
M.plugin = {
|
||||
"echasnovski/mini.hipatterns",
|
||||
event = "BufReadPre",
|
||||
event = "LazyFile",
|
||||
opts = function()
|
||||
local hi = require("mini.hipatterns")
|
||||
return {
|
||||
|
|
|
@ -2,7 +2,7 @@ return {
|
|||
-- lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
dependencies = {
|
||||
{ "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
|
@ -203,7 +203,7 @@ return {
|
|||
-- formatters
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
dependencies = { "mason.nvim" },
|
||||
opts = function()
|
||||
local nls = require("null-ls")
|
||||
|
|
|
@ -6,7 +6,7 @@ return {
|
|||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false, -- last release is way too old and doesn't work on Windows
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
event = { "LazyFile", "VeryLazy" },
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
|
|
|
@ -53,7 +53,7 @@ return {
|
|||
-- tabs, which include filetype icons and close buttons.
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
event = "LazyFile",
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
||||
|
@ -166,7 +166,7 @@ return {
|
|||
-- indent guides for Neovim
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
opts = {
|
||||
indent = {
|
||||
char = "│",
|
||||
|
@ -197,7 +197,7 @@ return {
|
|||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = "LazyFile",
|
||||
opts = {
|
||||
-- symbol = "▏",
|
||||
symbol = "│",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue