LazyVim / starter

Starter template for LazyVim
Apache License 2.0
957 stars 764 forks source link

Init failed #22

Closed jiang849725768 closed 1 year ago

jiang849725768 commented 1 year ago

Follow the tutorial and delete all things, everything is empty, then git clone But nvim command comes with the error below

Error detected while processing /root/.config/nvim/init.lua:
Invalid plugin spec {
  checker = {
    enabled = true
  },
  defaults = {
    lazy = false,
    version = false
  },
  install = {
    colorscheme = { "tokyonight", "habamax" }
  },
  performance = {
    rtp = {
      disabled_plugins = { "gzip", "tarPlugin", "tohtml", "tutor", "zipPlugin" }
    }
  },
  spec = { { "LazyVim/LazyVim",
      import = "lazyvim.plugins"
    }, {
      import = "plugins"
    } }
}
E5113: Error while calling lua chunk: ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:80: table index is nil
stack traceback:
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:80: in function 'add'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:116: in function 'normalize'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:217: in function 'spec'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:225: in function 'load'
        /root/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:45: in function 'setup'
        /root/.config/nvim/lua/config/lazy.lua:9: in main chunk
        [C]: in function 'require'
        /root/.config/nvim/init.lua:2: in main chunk

OS: CentOS8 neovim: 0.9.0

folke commented 1 year ago

you probably have a very old lazy installation on your system

Delete /root/.local/share/nvim/lazy and try again

jiang849725768 commented 1 year ago

you probably have a very old lazy installation on your system

Delete /root/.local/share/nvim/lazy and try again

Thx a lot for your reply. But it doesn't work

I do following steps again and the error still exists

  1. rm -rf ~/.local/state/nvim ~/.local/share/nvim ~/.cache/nvim
  2. git clone https://github.com/LazyVim/starter ~/.config/nvim
  3. nvim

BTW I use root as default so my ~ is /root/

folke commented 1 year ago

Sorry, but that's just not possible. The error you get is most likely from an ancient lazy version. So you'll have to see how you can fix that.

Thousands of people use LazyVim and never have I seen this issue once, so you're either doing something wrong, or your Neovim install is tainted