NTBBloodbath / cheovim

Neovim configuration switcher written in Lua. Inspired by chemacs.
GNU General Public License v2.0
332 stars 13 forks source link

Error while loading init.lua #10

Closed vspecky closed 2 years ago

vspecky commented 2 years ago

Followed the getting started instructions to the mark. Moved my config, deleted packer_compiled.lua, deleted everything in ~/.local/share/nvim/site/pack (I use Packer). But when I start up neovim, I get greeted by the following message :

Here's the output

Censoring all the bad reviews...
Error detected while processing /home/vspecky/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/vspecky/.config/nvim-code/init.lua:1: module 'plugins' not found:
        no field package.preload['plugins']
        no file './plugins.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/plugins.lua'
        no file '/usr/local/share/lua/5.1/plugins.lua'
        no file '/usr/local/share/lua/5.1/plugins/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/plugins.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/plugins/init.lua'
        no file '~/.config/nvim-code/lua/plugins.lua'
        no file './plugins.so'
        no file '/usr/local/lib/lua/5.1/plugins.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/plugins.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/vspecky/.config/nvim-code/init.lua:1: in main chunk
        [C]: in function 'dofile'
        /home/vspecky/.config/nvim/lua/cheovim/loader.lua:153: in function 'create_plugin_manager_symlinks'
        /home/vspecky/.config/nvim/lua/cheovim/loader.lua:239: in function 'create_plugin_symlink'
        /home/vspecky/.config/nvim/lua/cheovim.lua:14: in main chunk
        [C]: in function 'require'
        /home/vspecky/.config/nvim/init.lua:1: in main chunk

It says that

       no file '~/.config/nvim-code/lua/plugins.lua'

which makes no sense since that file does exist. Here's my config

local profiles = {
    default = { "~/.config/nvim-code", {
            plugins = "packer",
            preconfigure = "packer"
        }
    },
}

return "default", profiles
vspecky commented 2 years ago

Update: reopened nvim and manually ran PackerSync, then it worked.