virtual_name.lua:26: attempt to perform arithmetic on local 'last' (a nil value)
Error executing Lua callback: ...azy/smart-open.nvim/lua/smart-open/util/virtual_name.lua:26: attempt to perform arithmetic on local 'last' (a nil value)
stack traceback:
...azy/smart-open.nvim/lua/smart-open/util/virtual_name.lua:26: in function 'get_pos'
...azy/smart-open.nvim/lua/smart-open/util/virtual_name.lua:30: in function 'get_virtual_name'
...m/lua/telescope/_extensions/smart_open/finder/finder.lua:36: in function 'Finder'
...pen.nvim/lua/telescope/_extensions/smart_open/picker.lua:33: in function 'start'
...smart-open.nvim/lua/telescope/_extensions/smart_open.lua:23: in function <...smart-open.nvim/lua/telescope/_extensions/smart_open.lua:10> .../nvim-data/lazy/telescope.nvim/lua/telescope/command.lua:193: in function 'run_command'
.../nvim-data/lazy/telescope.nvim/lua/telescope/command.lua:259: in function 'load_command'
...Local/nvim-data/lazy/telescope.nvim/plugin/telescope.lua:108: in function <...Local/nvim-data/lazy/telescope.nvim/plugin/telescope.lua:107>
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
PS C:\Users\Steven\gamedev\short-dungeon\godot> nvim -V1 --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Running on Windows 11. It worked for a little while, I'm not really sure what exactly broke. I'm giving it no custom options. The same config works fine on my Linux setup.
I have the same issue on my windows 11 machine
I don't have a windows machine to support windows. I'd take a PR.
This should be fixed on the 0.3.x branch, which should work its way to main eventually.
Seeing the same error attempt to perform arithmetic on local 'last' (a nil value) on windows 10. with the latest smart-open
E5108: Error executing lua: ...ged\smart-open.nvim/lua/smart-open/util/virtual_name.lua:27: attempt to perform arithmetic on local 'last' (a nil value)
stack traceback:
...ged\smart-open.nvim/lua/smart-open/util/virtual_name.lua:27: in function 'get_pos'
...ged\smart-open.nvim/lua/smart-open/util/virtual_name.lua:31: in function 'get_virtual_name'
...m/lua/telescope/_extensions/smart_open/finder/finder.lua:36: in function 'Finder'
...pen.nvim/lua/telescope/_extensions/smart_open/picker.lua:33: in function 'start'
...smart-open.nvim/lua/telescope/_extensions/smart_open.lua:23: in function 'smart_open'
D:/Dropbox/neovim/config/nvim_utils_config.lua:13: in function <D:/Dropbox/neovim/config/nvim_utils_config.lua:12>
Same issue. It worked only the first time after installing sqlite3.dll, running nvim. Closed it, re-opened and this error appeared Seems this is a Windows path separator issue:
path = "C:/Users/blablal/nvim-data/lazy/smart-open.nvim/lua/smart-open/util/virtual_name.lua"
:lua vim.print(package.config:sub(1, 1) gives \
path:find('\\', 0, true) gives nil
However we cant hardcode path_separator to '/' since some path are given with '\' separator
It looks like smart_open/finder/finder.lua:22 variable history_result contains both forward and backward separator paths
history seems to be a sqlite3db instance, so I don't think there is a chance to cleanup the data coming from there. Maybe if someone knows where the data is inserted in the first place, it could be normalized before insertion.
vim.fs.normalize() looks like the way to go, but I need to insert calls to it in the right places