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

attempt to index local 'prerel 1' (a boolean value) #35

Open
Sleepful opened this issue Nov 25, 2023 · 1 comment
Open

attempt to index local 'prerel 1' (a boolean value) #35

Sleepful opened this issue Nov 25, 2023 · 1 comment

Comments

@Sleepful
Copy link

Sleepful commented Nov 25, 2023

I can't open vim.lsp.buf.code_action.
No idea what is going on here:

Error executing vim.schedule lua callback: ...s/jose/local/nvim/share/nvim/runtime/lua/vim/version.lua:78: attempt to index local 'prerel
1' (a boolean value)
stack traceback:
        ...s/jose/local/nvim/share/nvim/runtime/lua/vim/version.lua:78: in function 'cmp_prerel'
        ...s/jose/local/nvim/share/nvim/runtime/lua/vim/version.lua:120: in function '__eq'
        ...s/jose/local/nvim/share/nvim/runtime/lua/vim/version.lua:359: in function 'cmp'
        ...e-ui-select.nvim/lua/telescope/_extensions/ui-select.lua:32: in function <...e-ui-select.nvim/lua/telescope/_extensions/ui-sel
ect.lua:23>
        ...e-ui-select.nvim/lua/telescope/_extensions/ui-select.lua:106: in function 'select'
        ...s/jose/local/nvim/share/nvim/runtime/lua/vim/lsp/buf.lua:713: in function 'on_code_action_results'
        ...s/jose/local/nvim/share/nvim/runtime/lua/vim/lsp/buf.lua:731: in function 'callback'
        /Users/jose/local/nvim/share/nvim/runtime/lua/vim/lsp.lua:2053: in function 'handler'
        /Users/jose/local/nvim/share/nvim/runtime/lua/vim/lsp.lua:1411: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
@malbertzard
Copy link

So i took the time to look into the problem and i found what causes the problem its line 32:
if vim.version and vim.version.cmp(vim.version(), vim.version.parse "0.10-dev") >= 0 then

I changed it to this and it seems to work fine:
if vim.version().minor > 10 then
Im gonna open a PR and lets see if it gets resolved

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