mirror of https://github.com/folke/lazy.nvim.git
fix: only show fired ft events in debug obvioulsy. Fixes #232
This commit is contained in:
parent
a2eac68575
commit
c7c1295c3e
|
@ -1,6 +1,7 @@
|
||||||
local Event = require("lazy.core.handler.event")
|
local Event = require("lazy.core.handler.event")
|
||||||
local Util = require("lazy.core.util")
|
local Util = require("lazy.core.util")
|
||||||
local Loader = require("lazy.core.loader")
|
local Loader = require("lazy.core.loader")
|
||||||
|
local Config = require("lazy.core.config")
|
||||||
|
|
||||||
---@class LazyFiletypeHandler:LazyEventHandler
|
---@class LazyFiletypeHandler:LazyEventHandler
|
||||||
local M = {}
|
local M = {}
|
||||||
|
@ -23,12 +24,14 @@ end
|
||||||
function M:trigger(_, pattern, _)
|
function M:trigger(_, pattern, _)
|
||||||
for _, group in ipairs({ "filetypeplugin", "filetypeindent" }) do
|
for _, group in ipairs({ "filetypeplugin", "filetypeindent" }) do
|
||||||
Util.try(function()
|
Util.try(function()
|
||||||
|
if Config.options.debug then
|
||||||
Util.info({
|
Util.info({
|
||||||
"# Firing Events",
|
"# Firing Events",
|
||||||
" - **group:** `" .. group .. "`",
|
" - **group:** `" .. group .. "`",
|
||||||
" - **event:** FileType",
|
" - **event:** FileType",
|
||||||
pattern and (" - **pattern:** " .. pattern),
|
pattern and (" - **pattern:** " .. pattern),
|
||||||
})
|
})
|
||||||
|
end
|
||||||
vim.api.nvim_exec_autocmds("FileType", { group = group, modeline = false, pattern = pattern })
|
vim.api.nvim_exec_autocmds("FileType", { group = group, modeline = false, pattern = pattern })
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue