nvim: nasty, mid-rewrite update
This commit is contained in:
@@ -79,11 +79,26 @@ _G.packer_plugins = {
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-nvim-lua"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||
@@ -104,39 +119,36 @@ _G.packer_plugins = {
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/friendly-snippets",
|
||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
fzf = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/fzf",
|
||||
url = "https://github.com/junegunn/fzf"
|
||||
},
|
||||
["fzf.vim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/fzf.vim",
|
||||
url = "https://github.com/junegunn/fzf.vim"
|
||||
},
|
||||
["glow.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/glow.nvim",
|
||||
url = "https://github.com/ellisonleao/glow.nvim"
|
||||
},
|
||||
["impatient.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/impatient.nvim",
|
||||
url = "https://github.com/lewis6991/impatient.nvim"
|
||||
},
|
||||
["lsp-zero.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
|
||||
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
|
||||
},
|
||||
["mason-lspconfig.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
["mason-tool-installer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-tool-installer.nvim",
|
||||
url = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"
|
||||
},
|
||||
["mason.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||
url = "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
["nord.nvim"] = {
|
||||
config = { "\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\vconfig\17plugins/nord\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nord.nvim",
|
||||
needs_bufread = false,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/nord.nvim",
|
||||
url = "https://github.com/shaunsingh/nord.nvim"
|
||||
},
|
||||
["null-ls.nvim"] = {
|
||||
@@ -160,13 +172,17 @@ _G.packer_plugins = {
|
||||
url = "https://github.com/nvim-tree/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
config = { "\27LJ\2\nA\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\vconfig\23plugins/treesitter\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
@@ -188,8 +204,11 @@ _G.packer_plugins = {
|
||||
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||
config = { "\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\vconfig\22plugins/telescope\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = true,
|
||||
only_cond = false,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["vim-easy-align"] = {
|
||||
@@ -222,6 +241,14 @@ _G.packer_plugins = {
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
|
||||
url = "https://github.com/tpope/vim-rhubarb"
|
||||
},
|
||||
["vim-startuptime"] = {
|
||||
commands = { "StartupTime" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/vim-startuptime",
|
||||
url = "https://github.com/dstein64/vim-startuptime"
|
||||
},
|
||||
["vim-surround"] = {
|
||||
loaded = true,
|
||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||
@@ -245,11 +272,74 @@ _G.packer_plugins = {
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
local module_lazy_loads = {
|
||||
["^telescope"] = "telescope.nvim"
|
||||
}
|
||||
local lazy_load_called = {['packer.load'] = true}
|
||||
local function lazy_load_module(module_name)
|
||||
local to_load = {}
|
||||
if lazy_load_called[module_name] then return nil end
|
||||
lazy_load_called[module_name] = true
|
||||
for module_pat, plugin_name in pairs(module_lazy_loads) do
|
||||
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
|
||||
to_load[#to_load + 1] = plugin_name
|
||||
end
|
||||
end
|
||||
|
||||
if #to_load > 0 then
|
||||
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
|
||||
local loaded_mod = package.loaded[module_name]
|
||||
if loaded_mod then
|
||||
return function(modname) return loaded_mod end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not vim.g.packer_custom_loader_enabled then
|
||||
table.insert(package.loaders, 1, lazy_load_module)
|
||||
vim.g.packer_custom_loader_enabled = true
|
||||
end
|
||||
|
||||
-- Setup for: telescope.nvim
|
||||
time([[Setup for telescope.nvim]], 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\22plugins/telescope\frequire\0", "setup", "telescope.nvim")
|
||||
time([[Setup for telescope.nvim]], false)
|
||||
-- Setup for: nord.nvim
|
||||
time([[Setup for nord.nvim]], 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\17plugins/nord\frequire\0", "setup", "nord.nvim")
|
||||
time([[Setup for nord.nvim]], false)
|
||||
time([[packadd for nord.nvim]], true)
|
||||
vim.cmd [[packadd nord.nvim]]
|
||||
time([[packadd for nord.nvim]], false)
|
||||
-- Config for: nord.nvim
|
||||
time([[Config for nord.nvim]], 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\vconfig\17plugins/nord\frequire\0", "config", "nord.nvim")
|
||||
time([[Config for nord.nvim]], false)
|
||||
-- Conditional loads
|
||||
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
||||
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
||||
time([[Conditional loading of telescope-fzf-native.nvim]], false)
|
||||
|
||||
-- Command lazy-loads
|
||||
time([[Defining lazy-load commands]], true)
|
||||
pcall(vim.api.nvim_create_user_command, 'StartupTime', function(cmdargs)
|
||||
require('packer.load')({'vim-startuptime'}, { cmd = 'StartupTime', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
|
||||
end,
|
||||
{nargs = '*', range = true, bang = true, complete = function()
|
||||
require('packer.load')({'vim-startuptime'}, { cmd = 'StartupTime' }, _G.packer_plugins)
|
||||
return vim.fn.getcompletion('StartupTime ', 'cmdline')
|
||||
end})
|
||||
time([[Defining lazy-load commands]], false)
|
||||
|
||||
vim.cmd [[augroup packer_load_aucmds]]
|
||||
vim.cmd [[au!]]
|
||||
-- Event lazy-loads
|
||||
time([[Defining lazy-load event autocommands]], true)
|
||||
vim.cmd [[au BufRead * ++once lua require("packer.load")({'nvim-treesitter'}, { event = "BufRead *" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au BufNewFile * ++once lua require("packer.load")({'nvim-treesitter'}, { event = "BufNewFile *" }, _G.packer_plugins)]]
|
||||
time([[Defining lazy-load event autocommands]], false)
|
||||
vim.cmd("augroup END")
|
||||
|
||||
_G._packer.inside_compile = false
|
||||
if _G._packer.needs_bufread == true then
|
||||
vim.cmd("doautocmd BufRead")
|
||||
|
||||
Reference in New Issue
Block a user