Packer.nvim: Configuration table is not handled correctly by init

Created on 11 Jul 2020  ·  5Comments  ·  Source: wbthomason/packer.nvim

(Sorry for the vague title.)

It seems that the config table that is not correctly merged with the default values. I am following the example setup in the readme, except that I want to pass a table to packer.init(). However, this prevents the package handling functionality (install, update, etc.) from working; nothing happens. Specifically, if I pass

{
  display = {
    open_cmd = 'new [packer]',
    working_sym = '⟳', -- The symbol for a plugin being installed/updated
    error_sym = '✗', -- The symbol for a plugin with an error in installation/updating
    done_sym = '✓', -- The symbol for a plugin which has completed installation/updating
    removed_sym = '-', -- The symbol for an unused plugin which was removed
    moved_sym = '→', -- The symbol for a plugin which was moved (e.g. from opt to start)
    header_sym = '━', -- The symbol for the header line in packer's display
  }
}

the new buffer is opened, but nothing happens. This is even the case if I paste the full table with default values from the readme. If I omit one of the symbols from the table, packer complains about

E5108: Error executing lua ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:299: attempt to concate
nate local 'working_sym' (a nil value)
bug

All 5 comments

Ah, I see what's going on here - there's an issue with the interaction between copying user-set values into the config table and the use of the __index metamethod to handle keys that haven't been overridden. I'll fix this shortly; thanks for the report!

Great, I really appreciate the quick help! (By the way, the symbols above might be a nicer default -- I found them more uniform and less "aggressive" than the current ones.)

Hmm, yeah, I think I agree, actually. Thanks!

(a few lines less in my config :))

Now pushed!

Was this page helpful?
0 / 5 - 0 ratings