diff options
Diffstat (limited to 'plugin/packer_compiled.lua')
| -rw-r--r-- | plugin/packer_compiled.lua | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index c182b89..1c04c68 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -9,23 +9,26 @@ vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcall(function() - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 end - else - time = function(chunk, start) end end - +else + time = function(chunk, start) end +end + local function save_profiles(threshold) local sorted_times = {} for chunk_name, time_taken in pairs(profile_info) do @@ -38,8 +41,10 @@ local function save_profiles(threshold) results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' end end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end - _G._packer = _G._packer or {} _G._packer.profile_output = results end @@ -398,11 +403,6 @@ _G.packer_plugins = { path = "/home/alpha/.local/share/nvim/site/pack/packer/start/vim-commentary", url = "https://github.com/tpope/vim-commentary" }, - ["vim-composer"] = { - loaded = true, - path = "/home/alpha/.local/share/nvim/site/pack/packer/start/vim-composer", - url = "https://github.com/noahfrederick/vim-composer" - }, ["vim-dadbod"] = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/vim-dadbod", @@ -479,6 +479,10 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Config for: nvim-colorizer.lua +time([[Config for nvim-colorizer.lua]], true) +try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") +time([[Config for nvim-colorizer.lua]], false) -- Config for: nvim-projectconfig time([[Config for nvim-projectconfig]], true) try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23nvim-projectconfig\frequire\0", "config", "nvim-projectconfig") @@ -487,10 +491,6 @@ time([[Config for nvim-projectconfig]], false) time([[Config for fidget.nvim]], true) try_loadstring("\27LJ\2\n4\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\vfidget\frequire\0", "config", "fidget.nvim") time([[Config for fidget.nvim]], false) --- Config for: nvim-colorizer.lua -time([[Config for nvim-colorizer.lua]], true) -try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") -time([[Config for nvim-colorizer.lua]], false) -- Config for: git-worktree.nvim time([[Config for git-worktree.nvim]], true) try_loadstring("\27LJ\2\n>\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\17git-worktree\frequire\0", "config", "git-worktree.nvim") @@ -501,6 +501,13 @@ time([[Defining lazy-load commands]], true) pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file VimwikiIndex lua require("packer.load")({'vimwiki'}, { cmd = "VimwikiIndex", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]]) time([[Defining lazy-load commands]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + if should_profile then save_profiles() end end) |