Shougo / dein.vim

:zap: Dark powered Vim/Neovim plugin manager
MIT License
3.42k stars 197 forks source link

lua stack overflow if together with lazy.nvim ? #506

Closed aceforeverd closed 1 year ago

aceforeverd commented 1 year ago

Related Issues

Not found yet

Description

Lua stack overflow error if setup together with lazy.nvim.

Here is the message:

Error detected while processing /Users/danielace/.config/nvim/mini.vim:
line   49:
E5108: Error executing lua stack overflow
stack traceback:
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function 'get_rtp'
        vim/loader.lua: in function 'find'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function 'get_rtp'
        vim/loader.lua: in function 'find'
        ...
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function 'get_rtp'
        vim/loader.lua: in function 'find'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: in function 'require'
        ...elace/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:54: in function 'setup'
        [string ":lua"]:13: in main chunk
Error detected while processing /usr/local/Cellar/neovim/0.9.0/share/nvim/runtime/syntax/syntax.vim[25]../usr/local/Cellar/neovim/0.9.0/share/nvim/runtime/filetype.lua:
E5111: Error calling lua: stack overflow
stack traceback:
        [C]: in function 'match'
        [string ":lua"]:3: in function <[string ":lua"]:2>
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function 'get_rtp'
        vim/loader.lua: in function 'find'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        ...
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function 'get_rtp'
        vim/loader.lua: in function 'find'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function ''
        vim/loader.lua: in function <vim/loader.lua:0>
Error detected while processing /usr/local/Cellar/neovim/0.9.0/share/nvim/runtime/syntax/syntax.vim:

I'm not sure it is dein or lazy, but it seems fail only if the two together.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Desktop:

Minimal Config

set nocompatible

let s:home = expand('<sfile>:p:h')

let s:dein_repo = s:home . '/dein'

let s:dein_path = s:dein_repo . '/repos/github.com/Shougo/dein.vim'
if empty(glob(s:dein_path))
    execute '!git clone https://github.com/Shougo/dein.vim.git ' . s:dein_path
endif
let &runtimepath = &runtimepath . ',' . s:dein_path

if dein#load_state(s:dein_repo)
    call dein#begin(s:dein_repo)

    call dein#add(s:dein_path)

    call dein#end()
    call dein#save_state()
endif

lua << EOF
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end

vim.opt.rtp:prepend(lazypath)

require('lazy').setup({}, {
    install = {
      missing = false,
    },
    concurrency = 8,
    performance = {
      -- no reset, or other plugin manager won't work
      reset_packpath = false,
      rtp = {
        reset = false,
      },
    }
})
vim.go.loadplugins = true
EOF

Additional context

Add any other context about the problem here.

Shougo commented 1 year ago

lazy.nvim is plugin manager and dein.vim is also plugin manager. You must not mix them together. It will conflict.

Shougo commented 1 year ago

I'm not sure it is dein or lazy, but it seems fail only if the two together.

Why do you mix them? Please describe. I think it is not needed.

aceforeverd commented 1 year ago

I'm not sure it is dein or lazy, but it seems fail only if the two together.

Why do you mix them? Please describe. I think it is not needed.

I share common plugins of vim & neovim with dein historically, goes fine before 0.9.0

Shougo commented 1 year ago

I share common plugins of vim & neovim with dein historically, goes fine before 0.9.0

It may work older neovim. But it is not supported behavior. dein.vim works both Vim and neovim. What is the problem?

aceforeverd commented 1 year ago

I share common plugins of vim & neovim with dein historically, goes fine before 0.9.0

It may work older neovim. But it is not supported behavior. dein.vim works both Vim and neovim. What is the problem?

Thanks. Just trying things in my comfortable way, will move forward.

Shougo commented 1 year ago

I think you want to manage Vim plugins by dein.vim and neovim(lua) plugins by lazy.nvim. It should not. dein.vim can manage Vim plugins and neovim plugins.