Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

refactor: replace goto for Lua 5.1 compatibility#60

Merged
haorenW1025 merged 1 commit intonvim-lua:masterfrom
malept:lua5.1-compat
May 11, 2020
Merged

refactor: replace goto for Lua 5.1 compatibility#60
haorenW1025 merged 1 commit intonvim-lua:masterfrom
malept:lua5.1-compat

Conversation

@malept
Copy link
Copy Markdown
Contributor

@malept malept commented May 10, 2020

👋 I tried out this plugin with Neovim nightly via the unstable PPA on a clean install of Ubuntu 20.04, and I got the following error on when I run lua require'completion'.on_attach():

E5108: Error executing lua error loading module 'completion.complete' from file 'completion-nvim/lua/completion/complete.lua':
completion-nvim/lua/completion/complete.lua:40: '=' expected near 'continue'

It turns out that the unstable PPA version of nvim is linked against Lua 5.1 (:lua print(_VERSION)), which does not have support for goto. This pull request refactors that part of the code so that it shouldn't need a goto. Please let me know if there are further adjustments I need to make (or feel free to do them yourself in the interest of speed).

@haorenW1025
Copy link
Copy Markdown
Collaborator

Oh I didn't actually know that... I used goto only for mocking the continue like stuff so it's fine. I'll stop abusing it in the future:) Also a side note is I don't know if the unstable PPA version contains all the feature we need(like tbl_filter). If still recommend building neovim from source since it shouldn't be so complicated to do that, thanks anyway:)

@haorenW1025 haorenW1025 merged commit 2fb8bba into nvim-lua:master May 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants