mirror of https://github.com/folke/lazy.nvim.git
fix(loader): source filetype.lua before plugins. Fixes #35
This commit is contained in:
parent
9d12cdcc06
commit
ffcd0ab7bb
|
@ -49,6 +49,13 @@ function M.startup()
|
||||||
|
|
||||||
local rtp = vim.opt.rtp:get()
|
local rtp = vim.opt.rtp:get()
|
||||||
|
|
||||||
|
Util.track({ start = "filetype" })
|
||||||
|
local ft = vim.env.VIMRUNTIME .. "/filetype.lua"
|
||||||
|
Util.try(function()
|
||||||
|
vim.cmd("silent source " .. ft)
|
||||||
|
end, "Failed to source `" .. ft .. "`")
|
||||||
|
Util.track()
|
||||||
|
|
||||||
-- load plugins from rtp, excluding after
|
-- load plugins from rtp, excluding after
|
||||||
Util.track({ start = "rtp plugins" })
|
Util.track({ start = "rtp plugins" })
|
||||||
for _, path in ipairs(rtp) do
|
for _, path in ipairs(rtp) do
|
||||||
|
|
|
@ -242,6 +242,7 @@ function M:reason(reason, opts)
|
||||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/plugin/.*)", "%1")
|
reason.runtime = reason.runtime:gsub(".*/([^/]+/plugin/.*)", "%1")
|
||||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/after/.*)", "%1")
|
reason.runtime = reason.runtime:gsub(".*/([^/]+/after/.*)", "%1")
|
||||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/ftdetect/.*)", "%1")
|
reason.runtime = reason.runtime:gsub(".*/([^/]+/ftdetect/.*)", "%1")
|
||||||
|
reason.runtime = reason.runtime:gsub(".*/(runtime/.*)", "%1")
|
||||||
end
|
end
|
||||||
local time = reason.time and (" " .. math.floor(reason.time / 1e6 * 100) / 100 .. "ms")
|
local time = reason.time and (" " .. math.floor(reason.time / 1e6 * 100) / 100 .. "ms")
|
||||||
if time and not opts.time_right then
|
if time and not opts.time_right then
|
||||||
|
|
Loading…
Reference in New Issue