" Automatically generated packer.nvim plugin loader code if !has('nvim') finish endif lua << END local plugins = { ["emmet-vim"] = { loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/emmet-vim" }, ["goyo.vim"] = { commands = { "Goyo" }, loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/goyo.vim" }, ["limelight.vim"] = { commands = { "Limelight" }, loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/limelight.vim" }, ["vim-easy-align"] = { commands = { "EasyAlign" }, loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/vim-easy-align" }, ["vim-markdown"] = { loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/vim-markdown" }, ["vim-markdown-folding"] = { loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/vim-markdown-folding" }, vimtex = { loaded = false, only_sequence = false, only_setup = false, path = "/home/robert/.local/share/nvim/site/pack/packer/opt/vimtex" } } local function handle_bufread(names) for _, name in ipairs(names) do local path = plugins[name].path for _, dir in ipairs({ 'ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin' }) do if #vim.fn.finddir(dir, path) > 0 then vim.cmd('doautocmd BufRead') return end end end end _packer_load = nil local function handle_after(name, before) local plugin = plugins[name] plugin.load_after[before] = nil if next(plugin.load_after) == nil then _packer_load({name}, {}) end end _packer_load = function(names, cause) local some_unloaded = false for _, name in ipairs(names) do if not plugins[name].loaded then some_unloaded = true break end end if not some_unloaded then return end local fmt = string.format local del_cmds = {} local del_maps = {} for _, name in ipairs(names) do if plugins[name].commands then for _, cmd in ipairs(plugins[name].commands) do del_cmds[cmd] = true end end if plugins[name].keys then for _, key in ipairs(plugins[name].keys) do del_maps[key] = true end end end for cmd, _ in pairs(del_cmds) do vim.cmd('silent! delcommand ' .. cmd) end for key, _ in pairs(del_maps) do vim.cmd(fmt('silent! %sunmap %s', key[1], key[2])) end for _, name in ipairs(names) do if not plugins[name].loaded then vim.cmd('packadd ' .. name) if plugins[name].config then for _i, config_line in ipairs(plugins[name].config) do loadstring(config_line)() end end if plugins[name].after then for _, after_name in ipairs(plugins[name].after) do handle_after(after_name, name) vim.cmd('redraw') end end plugins[name].loaded = true end end handle_bufread(names) if cause.cmd then local lines = cause.l1 == cause.l2 and '' or (cause.l1 .. ',' .. cause.l2) vim.cmd(fmt('%s%s%s %s', lines, cause.cmd, cause.bang, cause.args)) elseif cause.keys then local keys = cause.keys local extra = '' while true do local c = vim.fn.getchar(0) if c == 0 then break end extra = extra .. vim.fn.nr2char(c) end if cause.prefix then local prefix = vim.v.count and vim.v.count or '' prefix = prefix .. '"' .. vim.v.register .. cause.prefix if vim.fn.mode('full') == 'no' then if vim.v.operator == 'c' then prefix = '' .. prefix end prefix = prefix .. vim.v.operator end vim.fn.feedkeys(prefix, 'n') end -- NOTE: I'm not sure if the below substitution is correct; it might correspond to the literal -- characters \ rather than the special key. vim.fn.feedkeys(string.gsub(string.gsub(cause.keys, '^', '\\') .. extra, '<[cC][rR]>', '\r')) elseif cause.event then vim.cmd(fmt('doautocmd %s', cause.event)) elseif cause.ft then vim.cmd(fmt('doautocmd %s FileType %s', 'filetypeplugin', cause.ft)) vim.cmd(fmt('doautocmd %s FileType %s', 'filetypeindent', cause.ft)) end end -- Runtimepath customization -- Pre-load configuration -- Post-load configuration -- Config for: nvim-treesitter loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20conf.treesitter\frequire\0")() -- Config for: nvim-colorizer.lua loadstring("\27LJ\1\2z\0\0\3\0\4\0\b4\0\0\0%\1\1\0>\0\2\0027\0\2\0)\1\0\0003\2\3\0>\0\3\1G\0\1\0\1\0\6\vrgb_fn\2\tname\2\rRRGGBBAA\1\vhsl_fn\2\tmode\15background\vRRGGBB\2\nsetup\14colorizer\frequire\0")() -- Config for: galaxyline.nvim loadstring("\27LJ\1\2$\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\tline\frequire\0")() -- Config for: nvim-lspconfig loadstring("\27LJ\1\2(\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\rconf.lsp\frequire\0")() -- Config for: telescope.nvim loadstring("\27LJ\1\2.\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\19conf.telescope\frequire\0")() -- Conditional loads -- Load plugins in order defined by `after` END function! s:load(names, cause) abort call luaeval('_packer_load(_A[1], _A[2])', [a:names, a:cause]) endfunction " Command lazy-loads command! -nargs=* -range -bang -complete=file Goyo call s:load(['goyo.vim'], { "cmd": "Goyo", "l1": , "l2": , "bang": , "args": }) command! -nargs=* -range -bang -complete=file Limelight call s:load(['limelight.vim'], { "cmd": "Limelight", "l1": , "l2": , "bang": , "args": }) command! -nargs=* -range -bang -complete=file EasyAlign call s:load(['vim-easy-align'], { "cmd": "EasyAlign", "l1": , "l2": , "bang": , "args": }) " Keymap lazy-loads augroup packer_load_aucmds au! " Filetype lazy-loads au FileType markdown ++once call s:load(['vim-markdown', 'vim-markdown-folding'], { "ft": "markdown" }) au FileType html ++once call s:load(['emmet-vim'], { "ft": "html" }) au FileType latex ++once call s:load(['vimtex'], { "ft": "latex" }) au FileType tex ++once call s:load(['vimtex'], { "ft": "tex" }) " Event lazy-loads augroup END