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

nvim version 0.10 bug #31

Open
cxwx opened this issue May 17, 2024 · 3 comments
Open

nvim version 0.10 bug #31

cxwx opened this issue May 17, 2024 · 3 comments

Comments

@cxwx
Copy link

cxwx commented May 17, 2024

Error executing vim.schedule lua callback: ...nxu/.local/share/nvim/lazy/specs.nvim/lua/spe
cs/init.lua:101: attempt to index field 'col' (a number value)
stack traceback:
...nxu/.local/share/nvim/lazy/specs.nvim/lua/specs/init.lua:101: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

@manosriram
Copy link

+1

@KishoreNewton
Copy link

KishoreNewton commented May 18, 2024

There is a type error in the initialization code of specs.nvim that causes incorrect handling of the config["col"] configuration parameter. Specifically, the code attempts to index a number as a table.

Location

File: specs.nvim/lua/specs/init.lua
Line: 101

Issue Details

The line config["col"][false] = dm[2] results in an error because config["col"] is expected to be a number, not a table. This occurs when trying to assign dm[2] to an index false of config["col"], which is not valid syntax for a number.

How to fix

Change the line from:

config["col"][false] = dm[2]

to:

config.col = dm[2]

This adjustment will directly assign the value of dm[2] to config.col, correcting the type handling and ensuring the configuration is set as intend

Addition Info:

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068

@cxwx cxwx mentioned this issue May 19, 2024
@cxwx
Copy link
Author

cxwx commented May 19, 2024

thanks @KishoreNewton,
It seems the author is not there
I've made a fork https://github.com/cxwx/specs.nvim/tree/main for nvim-0.10 users

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

3 participants