packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

opt = false gets ignored

Open janechicken opened this issue 3 years ago • 2 comments

  • nvim --version: NVIM v0.70 (Using lunarvim)
  • git --version: git version 2.35.1
  • Operating system/version: Gentoo
  • Terminal name/version: Alacritty 0.90

Steps to reproduce

In your init.lua, install something like this

{
  "user/repo",
  opt = false,
  config = function()
    require("user/repo").setup({
      option = { "setting" }
    })
  end
}

Actual behaviour

opt = false will be ignored and be installed as optional

Expected behaviour

opt = false won't be ignored and installed in ~/.local/share/nvim/site/pack/packer/start/repo

~~Solution~~

~~This isn't a good solution but I've noticed if you make another thing to set the plugin of the same one with opt = false as the only option it works but I don't know if the options still work if it's mentioned twice with opt = false~~

I realized the mentioned twice error comes into play
Plugin specification file(s)

Post or link your plugin specification files here, if you aren't able to provide a minimal reproducer

lvim.plugins = {
  { "andweeb/presence.nvim" },
  { "LunarVim/Colorschemes" },
  { "ellisonleao/gruvbox.nvim" },
  {
    "sindrets/diffview.nvim",
    event = "BufRead"
  },
  {
    "iamcco/markdown-preview.nvim",
    run = "cd app && npm install",
    ft = "markdown",
    config = function()
      vim.g.mkdp_auto_start = 1
    end,
  },
  {
    "norcalli/nvim-colorizer.lua",
    config = function()
      require("colorizer").setup({ "*" }, {
        RGB = true, -- #RGB hex codes
        RRGGBB = true, -- #RRGGBB hex codes
        RRGGBBAA = true, -- #RRGGBBAA hex codes
        rgb_fn = true, -- CSS rgb() and rgba() functions
        hsl_fn = true, -- CSS hsl() and hsla() functions
        css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
        css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
      })
    end,
  },
  { 'ThatOneOcto/vscode.nvim' },
  {
    "karb94/neoscroll.nvim",
    opt = false
  },
  {
    "karb94/neoscroll.nvim",
    event = "WinScrolled",
    config = function()
      require('neoscroll').setup({
        -- All these keys will be mapped to their corresponding default scrolling animation
        mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>',
          '<C-y>', '<C-e>', 'zt', 'zz', 'zb' },
        hide_cursor = true, -- Hide cursor while scrolling
        stop_eof = true, -- Stop at <EOF> when scrolling downwards
        use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope
        respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
        cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
        easing_function = nil, -- Default easing function
        pre_hook = nil, -- Function to run before the scrolling animation starts
        post_hook = nil, -- Function to run after the scrolling animation ends
      })
    end
  },
  {
    "ethanholz/nvim-lastplace",
    opt = false
  },
  {
    "ethanholz/nvim-lastplace",
    event = "BufRead",
    config = function()
      require("nvim-lastplace").setup({
        lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
        lastplace_ignore_filetype = {
          "gitcommit", "gitrebase", "svn", "hgcommit",
        },
        lastplace_open_folds = true,
      })
    end,
  },
}
packer log file

Post the contents of ~/.cache/nvim/packer.nvim.log here

[ERROR Mon 30 May 2022 06:01:06 PM EDT 5197835671034] .../site/pack/packer/start/packer.nvim/lua/packer/async.lua:20: Error in coroutine: ...ite/pack/packer/start/packer.nvim/lua/packer/install.lua:43: attempt to index a nil value
[WARN  Mon 30 May 2022 07:07:12 PM EDT 9164210990928] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Mon 30 May 2022 07:07:17 PM EDT 9168981289183] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Mon 30 May 2022 07:32:52 PM EDT 10703862647658] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Mon 30 May 2022 07:33:15 PM EDT 10726962096982] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:15 PM EDT 10727377756006] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:15 PM EDT 10727530522153] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:17 PM EDT 10728794805882] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:17 PM EDT 10728996960387] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:19 PM EDT 10731509826038] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:20 PM EDT 10731696495090] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Mon 30 May 2022 07:33:20 PM EDT 10731863240147] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 12:49:13 AM EDT 5642280842807] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:53 PM EDT 4307294212568] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:55 PM EDT 4309909917060] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:56 PM EDT 4310458616744] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:56 PM EDT 4310707926075] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:56 PM EDT 4310951811381] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:56 PM EDT 4311142342892] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:57 PM EDT 4311317520068] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:57 PM EDT 4311507984184] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:57 PM EDT 4311713970980] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:57 PM EDT 4311896623951] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:40:59 PM EDT 4314136727531] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:41:00 PM EDT 4314329503507] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:41:00 PM EDT 4314518120142] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:41:00 PM EDT 4314853400254] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:654: No plugin selected!
[WARN  Tue 31 May 2022 07:41:03 PM EDT 4317383407351] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:693: No plugin selected!
[WARN  Tue 31 May 2022 07:41:07 PM EDT 4321721875892] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 07:41:08 PM EDT 4322523903370] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 07:41:08 PM EDT 4322675218073] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 07:41:08 PM EDT 4322817207265] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 07:41:08 PM EDT 4322947983464] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 07:42:23 PM EDT 4397337911527] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Tue 31 May 2022 07:42:28 PM EDT 4402495778707] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Tue 31 May 2022 07:42:47 PM EDT 4421998573484] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Tue 31 May 2022 07:42:55 PM EDT 4429997169120] .../site/pack/packer/start/packer.nvim/lua/packer/clean.lua:79: Cleaning cancelled!
[WARN  Tue 31 May 2022 10:54:55 PM EDT 15949361031502] ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:625: No plugin selected!
[WARN  Tue 31 May 2022 10:56:49 PM EDT 16064239740857] ...narvim/site/pack/packer/start/packer.nvim/lua/packer.lua:204: Plugin "nvim-lastplace" is used twice! (line 104)
[WARN  Tue 31 May 2022 10:57:35 PM EDT 16110096212027] ...narvim/site/pack/packer/start/packer.nvim/lua/packer.lua:204: Plugin "neoscroll.nvim" is used twice! (line 104)
[WARN  Tue 31 May 2022 10:57:35 PM EDT 16110096299655] ...narvim/site/pack/packer/start/packer.nvim/lua/packer.lua:204: Plugin "nvim-lastplace" is used twice! (line 104)
packer compiled file ``` -- 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/octo/.cache/lvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/octo/.cache/lvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/octo/.cache/lvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/octo/.cache/lvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua" local install_cpath_pattern = "/home/octo/.cache/lvim/packer_hererocks/2.0.5/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 = { Colorschemes = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/Colorschemes", url = "https://github.com/LunarVim/Colorschemes" }, ["Comment.nvim"] = { after_files = { "/home/octo/.local/share/lunarvim/site/pack/packer/opt/Comment.nvim/after/plugin/Comment.lua" }, config = { "\27LJ\1\2?\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\22lvim.core.comment\frequire\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/Comment.nvim", url = "https://github.com/numToStr/Comment.nvim" }, ["FixCursorHold.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/FixCursorHold.nvim", url = "https://github.com/antoinemadec/FixCursorHold.nvim" }, LuaSnip = { config = { '\27LJ\1\2\3\0\0\t\0\18\2-4\0\0\0%\1\1\0>\0\2\0022\1\3\0007\2\2\0004\3\3\0>\3\1\2%\4\4\0%\5\5\0%\6\6\0%\a\a\0%\b\b\0>\2\a\0<\2\0\0007\2\2\0004\3\t\0>\3\1\2%\4\n\0>\2\3\0027\3\v\0\16\4\2\0>\3\2\2\15\0\3\0T\4\3\19\3\1\0\20\3\1\0039\2\3\0014\3\0\0%\4\f\0>\3\2\0027\3\r\3>\3\1\0014\3\0\0%\4\14\0>\3\2\0027\3\r\0033\4\15\0:\1\16\4>\3\2\0014\3\0\0%\4\17\0>\3\2\0027\3\r\3>\3\1\1G\0\1\0"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\15lvim.utils\frequire\3\4\2\0' }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["alpha-nvim"] = { config = { "\27LJ\1\2=\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\20lvim.core.alpha\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/alpha-nvim", url = "https://github.com/goolord/alpha-nvim" }, ["bufferline.nvim"] = { config = { "\27LJ\1\2B\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\25lvim.core.bufferline\frequire\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/bufferline.nvim", url = "https://github.com/akinsho/bufferline.nvim" }, ["cmp-buffer"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-nvim-lsp"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-path"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, cmp_luasnip = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, ["diffview.nvim"] = { loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/diffview.nvim", url = "https://github.com/sindrets/diffview.nvim" }, ["friendly-snippets"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/friendly-snippets", url = "https://github.com/rafamadriz/friendly-snippets" }, ["gitsigns.nvim"] = { config = { "\27LJ\1\2@\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\23lvim.core.gitsigns\frequire\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/gitsigns.nvim", url = "https://github.com/lewis6991/gitsigns.nvim" }, ["gruvbox.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/gruvbox.nvim", url = "https://github.com/ellisonleao/gruvbox.nvim" }, ["lua-dev.nvim"] = { loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/lua-dev.nvim", url = "https://github.com/max397574/lua-dev.nvim" }, ["lualine.nvim"] = { config = { "\27LJ\1\2?\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\22lvim.core.lualine\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" }, ["markdown-preview.nvim"] = { config = { "\27LJ\1\0021\0\0\2\0\3\0\0054\0\0\0007\0\1\0'\1\1\0:\1\2\0G\0\1\0\20mkdp_auto_start\6g\bvim\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/markdown-preview.nvim", url = "https://github.com/iamcco/markdown-preview.nvim" }, ["nlsp-settings.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nlsp-settings.nvim", url = "https://github.com/tamago324/nlsp-settings.nvim" }, ["null-ls.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/null-ls.nvim", url = "https://github.com/jose-elias-alvarez/null-ls.nvim" }, ["nvim-autopairs"] = { config = { "\27LJ\1\2A\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\24lvim.core.autopairs\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-autopairs", url = "https://github.com/windwp/nvim-autopairs" }, ["nvim-cmp"] = { config = { "\27LJ\1\2`\0\0\2\0\6\0\v4\0\0\0007\0\1\0007\0\2\0\15\0\0\0T\1\54\0\3\0%\1\4\0>\0\2\0027\0\5\0>\0\1\1G\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-colorizer.lua"] = { config = { "\27LJ\1\2|\0\0\3\0\5\0\b4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0003\2\4\0>\0\3\1G\0\1\0\1\0\a\bcss\2\vrgb_fn\2\rRRGGBBAA\2\vhsl_fn\2\vcss_fn\2\bRGB\2\vRRGGBB\2\1\2\0\0\6*\nsetup\14colorizer\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-colorizer.lua", url = "https://github.com/norcalli/nvim-colorizer.lua" }, ["nvim-lsp-installer"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer", url = "https://github.com/williamboman/nvim-lsp-installer" }, ["nvim-lspconfig"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-notify"] = { config = { "\27LJ\1\2>\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\21lvim.core.notify\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-notify", url = "https://github.com/rcarriga/nvim-notify" }, ["nvim-tree.lua"] = { config = { "\27LJ\1\2@\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-tree.lua", url = "https://github.com/kyazdani42/nvim-tree.lua" }, ["nvim-treesitter"] = { config = { "\27LJ\1\2B\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\25lvim.core.treesitter\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-treesitter", url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["nvim-ts-context-commentstring"] = { loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/nvim-ts-context-commentstring", url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring" }, ["nvim-web-devicons"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, ["packer.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, ["plenary.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/plenary.nvim", url = "https://github.com/nvim-lua/plenary.nvim" }, ["popup.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/popup.nvim", url = "https://github.com/nvim-lua/popup.nvim" }, ["presence.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/presence.nvim", url = "https://github.com/andweeb/presence.nvim" }, ["project.nvim"] = { config = { "\27LJ\1\2?\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\22lvim.core.project\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/project.nvim", url = "https://github.com/ahmedkhalf/project.nvim" }, ["schemastore.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/schemastore.nvim", url = "https://github.com/b0o/schemastore.nvim" }, ["structlog.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/structlog.nvim", url = "https://github.com/Tastyep/structlog.nvim" }, ["telescope-fzf-native.nvim"] = { loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/telescope-fzf-native.nvim", url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" }, ["telescope.nvim"] = { config = { "\27LJ\1\2A\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\24lvim.core.telescope\frequire\0" }, loaded = true, path = "/home/octo/.local/share/lunarvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, ["toggleterm.nvim"] = { config = { "\27LJ\1\2@\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\23lvim.core.terminal\frequire\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/toggleterm.nvim", url = "https://github.com/akinsho/toggleterm.nvim" }, ["which-key.nvim"] = { config = { "\27LJ\1\2A\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\24lvim.core.which-key\frequire\0" }, loaded = false, needs_bufread = false, only_cond = false, path = "/home/octo/.local/share/lunarvim/site/pack/packer/opt/which-key.nvim", url = "https://github.com/max397574/which-key.nvim" } }

time([[Defining packer_plugins]], false) local module_lazy_loads = { ["^lua%-dev"] = "lua-dev.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

-- Config for: nvim-treesitter time([[Config for nvim-treesitter]], true) try_loadstring("\27LJ\1\2B\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\25lvim.core.treesitter\frequire\0", "config", "nvim-treesitter") time([[Config for nvim-treesitter]], false) -- Config for: nvim-cmp time([[Config for nvim-cmp]], true) try_loadstring("\27LJ\1\2`\0\0\2\0\6\0\v4\0\0\0007\0\1\0007\0\2\0\15\0\0\0T\1\54\0\3\0%\1\4\0>\0\2\0027\0\5\0>\0\1\1G\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0", "config", "nvim-cmp") time([[Config for nvim-cmp]], false) -- Config for: nvim-tree.lua time([[Config for nvim-tree.lua]], true) try_loadstring("\27LJ\1\2@\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0", "config", "nvim-tree.lua") time([[Config for nvim-tree.lua]], false) -- Config for: alpha-nvim time([[Config for alpha-nvim]], true) try_loadstring("\27LJ\1\2=\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\20lvim.core.alpha\frequire\0", "config", "alpha-nvim") time([[Config for alpha-nvim]], false) -- Config for: nvim-colorizer.lua time([[Config for nvim-colorizer.lua]], true) try_loadstring("\27LJ\1\2|\0\0\3\0\5\0\b4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0003\2\4\0>\0\3\1G\0\1\0\1\0\a\bcss\2\vrgb_fn\2\rRRGGBBAA\2\vhsl_fn\2\vcss_fn\2\bRGB\2\vRRGGBB\2\1\2\0\0\6*\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") time([[Config for nvim-colorizer.lua]], false) -- Config for: lualine.nvim time([[Config for lualine.nvim]], true) try_loadstring("\27LJ\1\2?\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\22lvim.core.lualine\frequire\0", "config", "lualine.nvim") time([[Config for lualine.nvim]], false) -- Config for: LuaSnip time([[Config for LuaSnip]], true) try_loadstring('\27LJ\1\2\3\0\0\t\0\18\2-4\0\0\0%\1\1\0>\0\2\0022\1\3\0007\2\2\0004\3\3\0>\3\1\2%\4\4\0%\5\5\0%\6\6\0%\a\a\0%\b\b\0>\2\a\0<\2\0\0007\2\2\0004\3\t\0>\3\1\2%\4\n\0>\2\3\0027\3\v\0\16\4\2\0>\3\2\2\15\0\3\0T\4\3\19\3\1\0\20\3\1\0039\2\3\0014\3\0\0%\4\f\0>\3\2\0027\3\r\3>\3\1\0014\3\0\0%\4\14\0>\3\2\0027\3\r\0033\4\15\0:\1\16\4>\3\2\0014\3\0\0%\4\17\0>\3\2\0027\3\r\3>\3\1\1G\0\1\0"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\15lvim.utils\frequire\3\4\2\0', "config", "LuaSnip") time([[Config for LuaSnip]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\1\2A\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\24lvim.core.telescope\frequire\0", "config", "telescope.nvim") time([[Config for telescope.nvim]], false) -- Config for: nvim-notify time([[Config for nvim-notify]], true) try_loadstring("\27LJ\1\2>\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\21lvim.core.notify\frequire\0", "config", "nvim-notify") time([[Config for nvim-notify]], false) -- Config for: nvim-autopairs time([[Config for nvim-autopairs]], true) try_loadstring("\27LJ\1\2A\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\24lvim.core.autopairs\frequire\0", "config", "nvim-autopairs") time([[Config for nvim-autopairs]], false) -- Config for: project.nvim time([[Config for project.nvim]], true) try_loadstring("\27LJ\1\2?\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\22lvim.core.project\frequire\0", "config", "project.nvim") time([[Config for project.nvim]], false) vim.cmd [[augroup packer_load_aucmds]] vim.cmd [[au!]] -- Filetype lazy-loads time([[Defining lazy-load filetype autocommands]], true) vim.cmd [[au FileType markdown ++once lua require("packer.load")({'markdown-preview.nvim'}, { ft = "markdown" }, _G.packer_plugins)]] time([[Defining lazy-load filetype autocommands]], false) -- Event lazy-loads time([[Defining lazy-load event autocommands]], true) vim.cmd [[au BufReadPost * ++once lua require("packer.load")({'nvim-ts-context-commentstring'}, { event = "BufReadPost *" }, _G.packer_plugins)]] vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'toggleterm.nvim', 'bufferline.nvim', 'which-key.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim', 'diffview.nvim', 'Comment.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] time([[Defining lazy-load event autocommands]], false) vim.cmd("augroup END") 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


Post the contents of `packer_compiled.vim` here

</details>

janechicken avatar Jun 01 '22 03:06 janechicken

I have the same problem with telescope on Manjaro.

Stonks3141 avatar Jul 10 '22 20:07 Stonks3141

I was able to get rid of this problem. I finally decided to go through my "plugins.lua" file and all my config files.

As it turns out, it is possible for a config file to have a problem (that doesn't necessarily cause the associated plugin to fail), and this can cause packer to have this kind of problem. I had a very cryptic error message about invalid table behavior. When I finally figured it out, not only did the plugin start working, but it also stopped getting installed in the opt directory (I had opt = false set to no avail).

I also had some small but important errors in my "config=" and "setup=" directives. There was no error message thrown, but clearing that pair of errors helped packer perform correctly.

I'm sorry I can't give more specific examples. I didn't keep the bad configuration to use for examples...

syntaxman avatar Aug 25 '22 06:08 syntaxman

Can you reproduce this bug using a stock neovim with minimal configuration? If not it might be better to close this issue and take it up with lunarvim.

nat-418 avatar Oct 05 '22 23:10 nat-418

I wasn't using Lunarvim. I'm sorry, I was so focused on cleaning up my code, I didn't think of keeping anything around to reproduce it. IIRC, the main problem is that my "config=" directive was sometimes not a function. I don't remember more than that.

syntaxman avatar Oct 20 '22 23:10 syntaxman

@syntaxman in that case it would be good to close the issue, since there is nothing anyone can do to debug or investigate your problem.

nat-418 avatar Oct 21 '22 07:10 nat-418

Closed issue

janechicken avatar Oct 21 '22 11:10 janechicken