-
Notifications
You must be signed in to change notification settings - Fork 70
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
Avoid goto logic in internal.lua #208
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `goto` keyword is introduced in a newer version of lua, running this plugin with an older version of lua will produce an error: ``` Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward: line 1: E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue' stack traceback: [C]: in function 'error' vim.lua:63: in function <vim.lua:57> [C]: in function 'require' [string "luaeval()"]:1: in main chunk Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[15]..matchup#ts_engine#is_hl_enabled[4]..<SNR>126_forward: line 1: E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue' stack traceback: [C]: in function 'error' vim.lua:63: in function <vim.lua:57> [C]: in function 'require' [string "luaeval()"]:1: in main chunk Error detected while processing function matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward: line 1: E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue' stack traceback: [C]: in function 'error' vim.lua:63: in function <vim.lua:57> [C]: in function 'require' [string "luaeval()"]:1: in main chunk ``` This commit removes the goto keyword to avoid such error. Has been tested on debian testing. Related: AaronJackson/vrn#157
Thanks, but how did you build neovim with a different version of lua?
Luajit supports goto.
…On Wed, Feb 2, 2022, 10:29 PM Sainnhe Park ***@***.***> wrote:
The goto keyword is introduced in a newer version of lua, running this
plugin with an older version of lua will produce an error:
Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward:
line 1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
[C]: in function 'error'
vim.lua:63: in function <vim.lua:57>
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[15]..matchup#ts_engine#is_hl_enabled[4]..<SNR>126_forward:
line 1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
[C]: in function 'error'
vim.lua:63: in function <vim.lua:57>
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
Error detected while processing function matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward:
line 1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
[C]: in function 'error'
vim.lua:63: in function <vim.lua:57>
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
This commit removes the goto keyword to avoid such error. Has been
tested on debian testing.
Related: AaronJackson/vrn#157
<AaronJackson/vrn#157>
------------------------------
You can view, comment on, or merge this pull request online at:
#208
Commit Summary
- cfb8390
<cfb8390>
Avoid goto logic in internal.lua
File Changes
(1 file <https://github.com/andymass/vim-matchup/pull/208/files>)
- *M* lua/treesitter-matchup/internal.lua
<https://github.com/andymass/vim-matchup/pull/208/files#diff-11ecb1470262a3880293bec18aee20379a3999712dd6da9041f891a17cc6153b>
(28)
Patch Links:
- https://github.com/andymass/vim-matchup/pull/208.patch
- https://github.com/andymass/vim-matchup/pull/208.diff
—
Reply to this email directly, view it on GitHub
<#208>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSY3DK4TTEVYARCKFXSTW3UZHZBTANCNFSM5NNZHUJQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I honestly don't know what happened, I installed neovim on debian testing and this plugin breaks. This is my Dockerfile. |
I don't fully understand, but the change is reasonable. Merged, thanks for contributing! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
goto
keyword is introduced in a newer version of lua, running thisplugin with an older version of lua will produce an error:
This commit removes the goto keyword to avoid such error. Has been
tested on debian testing.
Related: AaronJackson/vrn#157