wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.82k stars 266 forks source link

Moving packers install directory (packpath) results in "Can't open file /path/to/manifest.." #1007

Closed RoryNesbitt closed 2 years ago

RoryNesbitt commented 2 years ago

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Steps to reproduce

This is the file I am running before anything else

I believe the relevant part is:

package_root = dir .. '/pack',
compile_path = dir .. '/plugin/packer_compiled.lua',

Actual behaviour

I get the following error when running PackerSync:

Error executing vim.schedule lua callback: ...ack/packer/start/packer.nvim/lua/packer/plugin_utils.lua:87: Vim(call):E482: Can't open file /path/to/manifest for writing: no such file or directory                           
stack traceback:
        [C]: in function 'cmd'
        ...ack/packer/start/packer.nvim/lua/packer/plugin_utils.lua:87: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Expected behaviour

Packer works the same as when run without these changes

packer files

Plugin specification file(s) Post or link your plugin specification files here, if you aren't able to provide a minimal reproducer [Relevant setup](https://github.com/RoryNesbitt/pvim/blob/main/pvim.lua)
packer log file Post the contents of ~/.cache/nvim/packer.nvim.log here Empty
packer compiled file Post the contents of `packer_compiled.vim` here ```lua -- Automatically generated packer.nvim plugin loader code if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') return end 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 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 sorted_times[#sorted_times + 1] = {chunk_name, time_taken} end table.sort(sorted_times, function(a, b) return a[2] > b[2] end) local results = {} for i, elem in ipairs(sorted_times) do if not threshold or threshold and elem[2] > threshold then results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' end end _G._packer = _G._packer or {} _G._packer.profile_output = results end time([[Luarocks path setup]], true) local package_path_str = "/home/rory/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/rory/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/rory/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/rory/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" local install_cpath_pattern = "/home/rory/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end if not string.find(package.cpath, install_cpath_pattern, 1, true) then package.cpath = package.cpath .. ';' .. install_cpath_pattern end time([[Luarocks path setup]], false) time([[try_loadstring definition]], true) local function try_loadstring(s, component, name) local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) if not success then vim.schedule(function() vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) end) end return result end time([[try_loadstring definition]], false) time([[Defining packer_plugins]], true) _G.packer_plugins = { ["Comment.nvim"] = { config = { "\27LJ\2\n5\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\fComment\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/Comment.nvim", url = "https://github.com/numToStr/Comment.nvim" }, LuaSnip = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["base16-vim"] = { loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/base16-vim", url = "https://github.com/chriskempson/base16-vim" }, ["cmp-buffer"] = { after_files = { "/home/rory/Documents/pvim/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" }, load_after = {}, loaded = true, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-cmdline"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/cmp-cmdline", url = "https://github.com/hrsh7th/cmp-cmdline" }, ["cmp-nvim-lsp"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-path"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, ["dashboard-nvim"] = { config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.dashboard\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/dashboard-nvim", url = "https://github.com/glepnir/dashboard-nvim" }, ["diffview.nvim"] = { config = { "\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.diffview\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/diffview.nvim", url = "https://github.com/sindrets/diffview.nvim" }, dracula = { after_files = { "/home/rory/Documents/pvim/pack/packer/opt/dracula/after/plugin/dracula.vim" }, loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/dracula", url = "https://github.com/dracula/vim" }, ["ejs-syntax"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/ejs-syntax", url = "https://github.com/nikvdp/ejs-syntax" }, firenvim = { config = { "\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.firenvim\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/firenvim", url = "https://github.com/glacambre/firenvim" }, ["friendly-snippets"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/friendly-snippets", url = "https://github.com/rafamadriz/friendly-snippets" }, ["gitsigns.nvim"] = { config = { "\27LJ\2\n6\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\rgitsigns\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/gitsigns.nvim", url = "https://github.com/lewis6991/gitsigns.nvim" }, gruvbox = { loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/gruvbox", url = "https://github.com/gruvbox-community/gruvbox" }, ["hydra.nvim"] = { config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.hydra\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/hydra.nvim", url = "https://github.com/anuvyklack/hydra.nvim" }, ["impatient.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\19enable_profile\14impatient\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/impatient.nvim", url = "https://github.com/lewis6991/impatient.nvim" }, ["indent-blankline.nvim"] = { config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27rnvim.indent-blankline\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/indent-blankline.nvim", url = "https://github.com/lukas-reineke/indent-blankline.nvim" }, ["lspkind-nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/lspkind-nvim", url = "https://github.com/onsails/lspkind-nvim" }, ["lspsaga.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/lspsaga.nvim", url = "https://github.com/glepnir/lspsaga.nvim" }, ["lualine.nvim"] = { config = { "\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18rnvim.lualine\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" }, ["markdown-preview.nvim"] = { config = { "\27LJ\2\n1\0\0\2\0\3\0\0056\0\0\0009\0\1\0)\1\1\0=\1\2\0K\0\1\0\20mkdp_auto_start\6g\bvim\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/markdown-preview.nvim", url = "https://github.com/iamcco/markdown-preview.nvim" }, ["mason-lspconfig.nvim"] = { config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.mason\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/mason-lspconfig.nvim", url = "https://github.com/williamboman/mason-lspconfig.nvim" }, ["mason.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/mason.nvim", url = "https://github.com/williamboman/mason.nvim" }, neogit = { config = { "\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17rnvim.neogit\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/neogit", url = "https://github.com/TimUntersberger/neogit" }, ["nord.nvim"] = { loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/nord.nvim", url = "https://github.com/shaunsingh/nord.nvim" }, ["null-ls.nvim"] = { config = { "\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18rnvim.null-ls\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/null-ls.nvim", url = "https://github.com/jose-elias-alvarez/null-ls.nvim" }, ["nvim-autopairs"] = { config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.autopairs\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-autopairs", url = "https://github.com/windwp/nvim-autopairs" }, ["nvim-cmp"] = { after = { "cmp-buffer" }, config = { "\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.nvim-cmp\frequire\0" }, loaded = true, only_config = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-colorizer.lua"] = { config = { "\27LJ\2\n7\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\14colorizer\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-colorizer.lua", url = "https://github.com/norcalli/nvim-colorizer.lua" }, ["nvim-dap"] = { config = { "\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14rnvim.dap\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-dap", url = "https://github.com/mfussenegger/nvim-dap" }, ["nvim-dap-ui"] = { config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.dapui\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-dap-ui", url = "https://github.com/rcarriga/nvim-dap-ui" }, ["nvim-dap-virtual-text"] = { config = { "\27LJ\2\nC\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\26nvim-dap-virtual-text\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-dap-virtual-text", url = "https://github.com/theHamsta/nvim-dap-virtual-text" }, ["nvim-lspconfig"] = { config = { "\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14rnvim.lsp\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-treesitter"] = { after = { "playground", "nvim-ts-autotag", "nvim-ts-rainbow" }, config = { "\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21rnvim.treesitter\frequire\0" }, loaded = true, only_config = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-treesitter", url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["nvim-ts-autotag"] = { load_after = {}, loaded = true, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/nvim-ts-autotag", url = "https://github.com/windwp/nvim-ts-autotag" }, ["nvim-ts-rainbow"] = { load_after = {}, loaded = true, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/nvim-ts-rainbow", url = "https://github.com/p00f/nvim-ts-rainbow" }, ["nvim-web-devicons"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, ["one-small-step-for-vimkind"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/one-small-step-for-vimkind", url = "https://github.com/jbyuki/one-small-step-for-vimkind" }, ["onedark.vim"] = { loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/onedark.vim", url = "https://github.com/joshdick/onedark.vim" }, ["packer.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, ["pandoc.nvim"] = { config = { "\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\vpandoc\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/pandoc.nvim", url = "https://github.com/aspeddro/pandoc.nvim" }, playground = { load_after = {}, loaded = true, needs_bufread = true, path = "/home/rory/Documents/pvim/pack/packer/opt/playground", url = "https://github.com/nvim-treesitter/playground" }, ["plenary.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/plenary.nvim", url = "https://github.com/nvim-lua/plenary.nvim" }, ["popup.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/popup.nvim", url = "https://github.com/nvim-lua/popup.nvim" }, ["spellsitter.nvim"] = { config = { "\27LJ\2\n9\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\16spellsitter\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/spellsitter.nvim", url = "https://github.com/lewis6991/spellsitter.nvim" }, ["stylish.nvim"] = { config = { "\27LJ\2\n8\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\rui_clock\fstylish\frequireW\1\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0003\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\2\vsilent\2\fnoremap\2\0\n\6n\bset\vkeymap\bvim\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/stylish.nvim", url = "https://github.com/sunjon/stylish.nvim" }, ["symbols-outline.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/symbols-outline.nvim", url = "https://github.com/simrat39/symbols-outline.nvim" }, ["telescope-dap.nvim"] = { config = { "\27LJ\2\nH\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\bdap\19load_extension\14telescope\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/telescope-dap.nvim", url = "https://github.com/nvim-telescope/telescope-dap.nvim" }, ["telescope-file-browser.nvim"] = { config = { "\27LJ\2\nQ\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\17file_browser\19load_extension\14telescope\frequire\0" }, load_after = {}, loaded = true, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/telescope-file-browser.nvim", url = "https://github.com/nvim-telescope/telescope-file-browser.nvim" }, ["telescope-fzy-native.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/telescope-fzy-native.nvim", url = "https://github.com/nvim-telescope/telescope-fzy-native.nvim" }, ["telescope-ui-select.nvim"] = { config = { "\27LJ\2\nN\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\14ui-select\19load_extension\14telescope\frequire\0" }, load_after = {}, loaded = true, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/telescope-ui-select.nvim", url = "https://github.com/nvim-telescope/telescope-ui-select.nvim" }, ["telescope.nvim"] = { after = { "telescope-file-browser.nvim", "telescope-ui-select.nvim" }, config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.telescope\frequire\0" }, loaded = true, only_config = true, path = "/home/rory/Documents/pvim/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, ["tmux.nvim"] = { config = { "\27LJ\2\n™\1\0\0\4\0\b\0\v6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\0025\3\6\0=\3\a\2B\0\2\1K\0\1\0\vresize\1\0\1\31enable_default_keybindings\2\15navigation\1\0\0\1\0\1\31enable_default_keybindings\2\nsetup\ttmux\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/tmux.nvim", url = "https://github.com/aserowy/tmux.nvim" }, ["true-zen.nvim"] = { config = { "\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.true-zen\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/true-zen.nvim", url = "https://github.com/Pocco81/true-zen.nvim" }, ["twilight.nvim"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/twilight.nvim", url = "https://github.com/folke/twilight.nvim" }, ["vim-code-dark"] = { loaded = false, needs_bufread = false, path = "/home/rory/Documents/pvim/pack/packer/opt/vim-code-dark", url = "https://github.com/tomasiser/vim-code-dark" }, ["vim-devicons"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/vim-devicons", url = "https://github.com/ryanoasis/vim-devicons" }, ["vim-multiple-cursors"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/vim-multiple-cursors", url = "https://github.com/terryma/vim-multiple-cursors" }, ["vim-repeat"] = { config = { "\27LJ\2\nn\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0O silent! call repeat#set(\"\\MyWonderfulMap\", v:count)\n \bcmd\bvim\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/vim-repeat", url = "https://github.com/tpope/vim-repeat" }, ["vim-surround"] = { loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/vim-surround", url = "https://github.com/tpope/vim-surround" }, ["which-key.nvim"] = { config = { "\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\14which-key\frequire\0" }, loaded = true, path = "/home/rory/Documents/pvim/pack/packer/start/which-key.nvim", url = "https://github.com/folke/which-key.nvim" } } time([[Defining packer_plugins]], false) -- Config for: nvim-dap-ui time([[Config for nvim-dap-ui]], true) try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.dapui\frequire\0", "config", "nvim-dap-ui") time([[Config for nvim-dap-ui]], false) -- Config for: dashboard-nvim time([[Config for dashboard-nvim]], true) try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.dashboard\frequire\0", "config", "dashboard-nvim") time([[Config for dashboard-nvim]], false) -- Config for: true-zen.nvim time([[Config for true-zen.nvim]], true) try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.true-zen\frequire\0", "config", "true-zen.nvim") time([[Config for true-zen.nvim]], false) -- Config for: nvim-treesitter time([[Config for nvim-treesitter]], true) try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21rnvim.treesitter\frequire\0", "config", "nvim-treesitter") time([[Config for nvim-treesitter]], false) -- Config for: neogit time([[Config for neogit]], true) try_loadstring("\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17rnvim.neogit\frequire\0", "config", "neogit") time([[Config for neogit]], false) -- Config for: lualine.nvim time([[Config for lualine.nvim]], true) try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18rnvim.lualine\frequire\0", "config", "lualine.nvim") time([[Config for lualine.nvim]], false) -- Config for: firenvim time([[Config for firenvim]], true) try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.firenvim\frequire\0", "config", "firenvim") time([[Config for firenvim]], false) -- Config for: diffview.nvim time([[Config for diffview.nvim]], true) try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.diffview\frequire\0", "config", "diffview.nvim") time([[Config for diffview.nvim]], false) -- Config for: nvim-autopairs time([[Config for nvim-autopairs]], true) try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.autopairs\frequire\0", "config", "nvim-autopairs") time([[Config for nvim-autopairs]], false) -- Config for: nvim-cmp time([[Config for nvim-cmp]], true) try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19rnvim.nvim-cmp\frequire\0", "config", "nvim-cmp") time([[Config for nvim-cmp]], false) -- Config for: nvim-colorizer.lua time([[Config for nvim-colorizer.lua]], true) try_loadstring("\27LJ\2\n7\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\14colorizer\frequire\0", "config", "nvim-colorizer.lua") time([[Config for nvim-colorizer.lua]], false) -- Config for: Comment.nvim time([[Config for Comment.nvim]], true) try_loadstring("\27LJ\2\n5\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\fComment\frequire\0", "config", "Comment.nvim") time([[Config for Comment.nvim]], false) -- Config for: markdown-preview.nvim time([[Config for markdown-preview.nvim]], true) try_loadstring("\27LJ\2\n1\0\0\2\0\3\0\0056\0\0\0009\0\1\0)\1\1\0=\1\2\0K\0\1\0\20mkdp_auto_start\6g\bvim\0", "config", "markdown-preview.nvim") time([[Config for markdown-preview.nvim]], false) -- Config for: gitsigns.nvim time([[Config for gitsigns.nvim]], true) try_loadstring("\27LJ\2\n6\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\rgitsigns\frequire\0", "config", "gitsigns.nvim") time([[Config for gitsigns.nvim]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20rnvim.telescope\frequire\0", "config", "telescope.nvim") time([[Config for telescope.nvim]], false) -- Config for: nvim-dap-virtual-text time([[Config for nvim-dap-virtual-text]], true) try_loadstring("\27LJ\2\nC\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\26nvim-dap-virtual-text\frequire\0", "config", "nvim-dap-virtual-text") time([[Config for nvim-dap-virtual-text]], false) -- Config for: telescope-dap.nvim time([[Config for telescope-dap.nvim]], true) try_loadstring("\27LJ\2\nH\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\bdap\19load_extension\14telescope\frequire\0", "config", "telescope-dap.nvim") time([[Config for telescope-dap.nvim]], false) -- Config for: nvim-lspconfig time([[Config for nvim-lspconfig]], true) try_loadstring("\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14rnvim.lsp\frequire\0", "config", "nvim-lspconfig") time([[Config for nvim-lspconfig]], false) -- Config for: null-ls.nvim time([[Config for null-ls.nvim]], true) try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18rnvim.null-ls\frequire\0", "config", "null-ls.nvim") time([[Config for null-ls.nvim]], false) -- Config for: hydra.nvim time([[Config for hydra.nvim]], true) try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.hydra\frequire\0", "config", "hydra.nvim") time([[Config for hydra.nvim]], false) -- Config for: spellsitter.nvim time([[Config for spellsitter.nvim]], true) try_loadstring("\27LJ\2\n9\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\16spellsitter\frequire\0", "config", "spellsitter.nvim") time([[Config for spellsitter.nvim]], false) -- Config for: which-key.nvim time([[Config for which-key.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\14which-key\frequire\0", "config", "which-key.nvim") time([[Config for which-key.nvim]], false) -- Config for: vim-repeat time([[Config for vim-repeat]], true) try_loadstring("\27LJ\2\nn\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0O silent! call repeat#set(\"\\MyWonderfulMap\", v:count)\n \bcmd\bvim\0", "config", "vim-repeat") time([[Config for vim-repeat]], false) -- Config for: indent-blankline.nvim time([[Config for indent-blankline.nvim]], true) try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27rnvim.indent-blankline\frequire\0", "config", "indent-blankline.nvim") time([[Config for indent-blankline.nvim]], false) -- Config for: impatient.nvim time([[Config for impatient.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\19enable_profile\14impatient\frequire\0", "config", "impatient.nvim") time([[Config for impatient.nvim]], false) -- Config for: nvim-dap time([[Config for nvim-dap]], true) try_loadstring("\27LJ\2\n)\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\14rnvim.dap\frequire\0", "config", "nvim-dap") time([[Config for nvim-dap]], false) -- Config for: tmux.nvim time([[Config for tmux.nvim]], true) try_loadstring("\27LJ\2\n™\1\0\0\4\0\b\0\v6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\0025\3\6\0=\3\a\2B\0\2\1K\0\1\0\vresize\1\0\1\31enable_default_keybindings\2\15navigation\1\0\0\1\0\1\31enable_default_keybindings\2\nsetup\ttmux\frequire\0", "config", "tmux.nvim") time([[Config for tmux.nvim]], false) -- Config for: pandoc.nvim time([[Config for pandoc.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\vpandoc\frequire\0", "config", "pandoc.nvim") time([[Config for pandoc.nvim]], false) -- Config for: mason-lspconfig.nvim time([[Config for mason-lspconfig.nvim]], true) try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16rnvim.mason\frequire\0", "config", "mason-lspconfig.nvim") time([[Config for mason-lspconfig.nvim]], false) -- Config for: stylish.nvim time([[Config for stylish.nvim]], true) try_loadstring("\27LJ\2\n8\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\rui_clock\fstylish\frequireW\1\0\6\0\a\0\t6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0003\4\5\0005\5\6\0B\0\5\1K\0\1\0\1\0\2\vsilent\2\fnoremap\2\0\n\6n\bset\vkeymap\bvim\0", "config", "stylish.nvim") time([[Config for stylish.nvim]], false) -- Load plugins in order defined by `after` time([[Sequenced loading]], true) vim.cmd [[ packadd cmp-buffer ]] vim.cmd [[ packadd nvim-ts-rainbow ]] vim.cmd [[ packadd playground ]] vim.cmd [[ packadd nvim-ts-autotag ]] vim.cmd [[ packadd telescope-ui-select.nvim ]] -- Config for: telescope-ui-select.nvim try_loadstring("\27LJ\2\nN\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\14ui-select\19load_extension\14telescope\frequire\0", "config", "telescope-ui-select.nvim") vim.cmd [[ packadd telescope-file-browser.nvim ]] -- Config for: telescope-file-browser.nvim try_loadstring("\27LJ\2\nQ\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\17file_browser\19load_extension\14telescope\frequire\0", "config", "telescope-file-browser.nvim") time([[Sequenced loading]], false) if should_profile then save_profiles() end end) if not no_errors then error_msg = error_msg:gsub('"', '\\"') vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') end ```
EdenEast commented 2 years ago

Are you running neovim with --clean as a argument? If so then the function s:LoadRemotePlugins() is not called. This sets g:loaded_remote_plugins to the correct path.

To get around this you can set vim.g.loaded_remote_plugins = 1. You could also check argv for --clean argument.

local function check_clean()
  for _, arg in ipairs(vim.v.argv) do
    if arg == '--clean' then
      vim.g.loaded_remote_plugins = 1
      return
    end
  end
end
check_clean()
RoryNesbitt commented 2 years ago

Yes that is exactly what I am doing. Thank you for the information, I'll test it as soon as I can

RoryNesbitt commented 2 years ago

Okay this has removed the error message when running PackerSync, which is great thank you.

However, when running with those settings there is still an issue I thought was related where it seems none of the files that are in config = "require'...'" are being required. Mainly evidenced by missing keymaps that would exist from those files. They are then loaded as expected when you run PackerCompile.

The launch command I'm using is nvim --clean --cmd "so settings-file.lua" -u /path/to/config/init.lua so as to load those settings first then load the regular config

EdenEast commented 2 years ago
  vim.opt.rtp:append(join_paths(dir, "config"))
  vim.cmd('set packpath=' .. dir)
  vim.g.loaded_remote_plugins = 1

-- ...

  packer.init({
    package_root = join_paths(dir, "pack"),
    compile_path = join_paths(dir, "plugin", "packer_compiled.lua"),
  })

Looking at your pvim.lua file it looks like you are adding dir + config path to the runtimepath but the compile path is creating at dir + plugin + packer_compiled.lua. This directory is not in your runtimepath. You should also add dir as well or change the locatio nof your plugin + packer_compiled.lua file to somewhere in your runtimepath.

RoryNesbitt commented 2 years ago

Thanks @EdenEast that fixed it