mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 09:48:59 +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
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue