Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while opening a file: E5108: Error executing lua vim.lua:63: .../.config/nvim/pack/minpac/start/lsp_signature.nvim/lua/lsp_signature.lua:225: '=' expected near 'continue' #29

Closed
jian-lin opened this issue Jun 12, 2021 · 5 comments

Comments

@jian-lin
Copy link

I use minpac to install this plugin call minpac#add('ray-x/lsp_signature.nvim'). And I put this in my init.vim:

lua << EOF
require'lsp_signature'.on_attach()
EOF

Every time I open a file, this error appears:

E5108: Error executing lua vim.lua:63: .../.config/nvim/pack/minpac/start/lsp_signature.nvim/lua/lsp_signature.lua:225: '=' expected near 'continue'

The error line is goto continue. After I comment out that line, a similar error appears:

E5108: Error executing lua vim.lua:63: .../.config/nvim/pack/minpac/start/lsp_signature.nvim/lua/lsp_signature.lua:232: '=' expected near 'continue'

This error line is goto continue, too. After I comment out that line, another error appears:

E5108: Error executing lua vim.lua:63: .../.config/nvim/pack/minpac/start/lsp_signature.nvim/lua/lsp_signature.lua:260: unexpected symbol near ':'

This error line is ::continue::. After I comment out that line, no error appears.

I use the prebuilt neovim on github and its version is:

NVIM v0.5.0-dev+1398-gd09b8ad71
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
@ray-x
Copy link
Owner

ray-x commented Jun 13, 2021

Unable to reproduce
Here is minium vimrc with minipack. Sample is given with python pyright

if &compatible
  " `:set nocp` has many side effects. Therefore this should be done
  " only when 'compatible' is set.
  set nocompatible
endif
function! PackInit() abort
packadd minpac

call minpac#init()

" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})

" Add other plugins here.
call minpac#add('vim-jp/syntax-vim-ex')
call minpac#add('neovim/nvim-lspconfig')

call minpac#add('ray-x/aurora')
call minpac#add('ray-x/lsp_signature.nvim')
endfunction

" Load the plugins right now. (optional)
"packloadall



lua <<EOF

require'lspconfig'.pyright.setup {}
require'lsp_signature'.on_attach()
EOF


command! PackUpdate call PackInit() | call minpac#update()
command! PackClean  call PackInit() | call minpac#clean()
command! PackStatus packadd minpac | call minpac#status()

My neovim version: Jun 11 67eb63df506ed0e3

@jian-lin
Copy link
Author

Thanks for your help.
I find the cause is that I compile neovim against lua-5.1. Since goto is introduced in lua-5.2, this error appears.
I said my neovim is prebuilt on github because I thought it may be convenient for you to debug and I did reproduce it on the prebuilt version. Now I think I have made some mistakes when reproducing this on the prebuilt version.

@ray-x
Copy link
Owner

ray-x commented Jun 13, 2021

It is strange
I do not think it is the case.
As I also use LuaJIT 2.1.0-beta3

NVIM v0.5.0-dev+1385-g93f15db5d-dirty                                                                                                                                                 
Build type: Release                                                                                                                                                                   
LuaJIT 2.1.0-beta3                                                                                                                                                                    

goto is available in Lua-JIT. (check this : https://luajit.org/extensions.html)

@jian-lin
Copy link
Author

Yes, goto is available in luajit and lua-5.2. However, on Gentoo, neovim is compiled against lua-5.1, which doesn't support goto, by default.
I have this issue when compiling neovim against lua-5.1. After I compile neovim against luajit, I don't have this issue. Maybe I didn't express myself clearly in the last message.

@ray-x
Copy link
Owner

ray-x commented Jun 13, 2021

I think you need to file an issue in neovim for platform gentoo.
Lots of neovim plugins built on LuaJIT. And programmer is presuming the LuaJIT is available by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants