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

BUG: renderer.lua:431: '=' expected near 'continue' #1330

Open
3 tasks done
subnut opened this issue Jan 31, 2024 · 3 comments · May be fixed by #1673
Open
3 tasks done

BUG: renderer.lua:431: '=' expected near 'continue' #1330

subnut opened this issue Jan 31, 2024 · 3 comments · May be fixed by #1673
Labels
bug Something isn't working good-first-issue help wanted Extra attention is needed wontfix This will not be worked on
Milestone

Comments

@subnut
Copy link

subnut commented Jan 31, 2024

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

NVIM v0.9.5

Operating System / Version

Chimera Linux

Describe the Bug

Here's the full output of nvim -v

$ nvim -v
NVIM v0.9.5
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/lib/ccache/bin/clang -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_VENDOR_BIT -I/usr/include/lua5.1 -I/usr/include -I/usr/include -I/builddir/neovim-0.9.5/build/src/nvim/auto -I/builddir/neovim-0.9.5/build/include -I/builddir/neovim-0.9.5/build/cmake.config -I/builddir/neovim-0.9.5/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Do note the absence of LuaJIT.
That's also the reason I used packer.nvim for the minimal config below (since lazy.nvim requires LuaJIT)

Screenshots, Traceback

E5108: Error executing lua ...m.full/site/pack/packer/start/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:431: '=' expected near 'continue'
stack traceback:
        [C]: in function 'error'
        ?: in function <?:15>
        [C]: in function 'require'
        ...nvim/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:4: in main chunk
        [C]: in function 'require'
        ...start/neo-tree.nvim/lua/neo-tree/sources/manager.lua:6: in main chunk
        [C]: in function 'require'
        ...er/start/neo-tree.nvim/lua/neo-tree/command/init.lua:3: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

Steps to Reproduce

  1. Populate init.lua with the config given below
  2. :Neotree

Expected Behavior

No errors.

Your Configuration

-- require'plugins'
local ensure_packer = function()
  local fn = vim.fn
  local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
  if fn.empty(fn.glob(install_path)) > 0 then
    fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
    vim.cmd [[packadd packer.nvim]]
    return true
  end
  return false
end

local packer_bootstrap = ensure_packer()

return require('packer').startup(function(use)
  use 'wbthomason/packer.nvim'
  use {
  "nvim-neo-tree/neo-tree.nvim",
    branch = "v3.x",
    requires = {
      "nvim-lua/plenary.nvim",
      "MunifTanjim/nui.nvim",
    }
  }
  if packer_bootstrap then
    require('packer').sync()
  end
end)
@subnut subnut added the bug Something isn't working label Jan 31, 2024
@bwpge
Copy link
Contributor

bwpge commented Feb 16, 2024

I think before addressing this we would need guidance from the plugin maintainers if Lua 5.1 is supported. There are some ugly workarounds to avoid a goto (see: https://stackoverflow.com/a/13825260), but I'm not sure what other compatibility problems are lurking since I don't have access to Neovim without LuaJIT.

@pysan3
Copy link
Collaborator

pysan3 commented Feb 16, 2024

Wow, is it even possible to run neovim without luajit (with enough speed)??

Iirc there are 2 places in the code that uses the goto::continue feature, just for the sake of cleaner code (or nested if-else gets so much indented).

I'm doing a complete rewrite now, and in the newer code, I deleted all goto's.

Please wait till that's finished (which will take very long tho), or please submit a PR yourself as the core maintainers all use luajit and have no time to do the refactoring.

@cseickel could you make a v4 tag or a milestone so I can start tagging what issues I can/should iron out in my rewrite?

@pysan3 pysan3 added help wanted Extra attention is needed wontfix This will not be worked on good-first-issue labels Feb 16, 2024
@cseickel
Copy link
Contributor

@cseickel could you make a v4 tag or a milestone so I can start tagging what issues I can/should iron out in my rewrite?

I created a v4.0 milestone

@pysan3 pysan3 added this to the v4.0 milestone Feb 18, 2024
@pynappo pynappo linked a pull request Jan 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants