Skip to content

Extremely simple configuration doesn't work (load order) #777

Answered by grundic
grundic asked this question in Q&A
Discussion options

You must be logged in to vote

I've come with simple WTR solution:

$ cat <<EOF > simple.lua
print("Test configuration has sucessfully been loaded")
require('packer').startup(function()
  use 'wbthomason/packer.nvim'
  use 'morhetz/gruvbox'
end)

cmd [[colorscheme gruvbox]]
EOF

# make sure the gruvbox is not installed, remove generated cache
$ rm -rf ~/.local/share/nvim/site/pack/packer/start/gruvbox 
$ rm -f ~/.config/nvim/plugin/packer_compiled.lua

# try to start neovim
$ nvim -u simple.lua

Test configuration has sucessfully been loaded
Error detected while processing /usr/local/home/cgi/simple.lua:
E5113: Error while calling lua chunk: simple.lua:11: attempt to call global 'cmd' (a nil value)
stack traceback:
    …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wbthomason
Comment options

@grundic
Comment options

Answer selected by wbthomason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants