You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just after installing, I open a .js file and the error attempt to call field 'iter' (a nil value) appears.
I search for the function iter in the codebase of the dropbar .lua files and comment the following code and all works perfectly.
The code is in lua/sources/lsp.lua line 288
-- Code uncommented doesn't work
for idx, symbol in vim.iter(lsp_symbols):enumerate():rev() do
if cursor_in_range(cursor, symbol.range) then
table.insert(
dropbar_symbols,
utils.to_dropbar_symbol(unify_document_symbol(symbol, lsp_symbols, idx))
)
if symbol.children then
convert_document_symbol_list(symbol.children, dropbar_symbols, cursor)
end
return
end
end
-- This code commented, all works perfectly
-- for idx, symbol in vim.iter(lsp_symbols):enumerate():rev() do
-- if cursor_in_range(cursor, symbol.range) then
-- table.insert(
-- dropbar_symbols,
-- utils.to_dropbar_symbol(unify_document_symbol(symbol, lsp_symbols, idx))
-- )
-- if symbol.children then
-- convert_document_symbol_list(symbol.children, dropbar_symbols, cursor)
-- end
-- return
-- end
-- end
Error executing vim.schedule lua callback: ...ck/packer/start/dropbar.nvim/lua/dropbar/sources/lsp.lua:288: attempt to call fi
eld 'iter' (a nil value)
stack traceback:
...ck/packer/start/dropbar.nvim/lua/dropbar/sources/lsp.lua:288: in function 'convert_document_symbol_list'
...ck/packer/start/dropbar.nvim/lua/dropbar/sources/lsp.lua:311: in function 'get_symbols'
...e/pack/packer/start/dropbar.nvim/lua/dropbar/configs.lua:119: in function 'get_symbols'
.../site/pack/packer/start/dropbar.nvim/lua/dropbar/bar.lua:280: in function 'update'
...ck/packer/start/dropbar.nvim/lua/dropbar/sources/lsp.lua:343: in function 'handler'
...w/Cellar/neovim/0.9.1/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Additional information
No response
The text was updated successfully, but these errors were encountered:
Sorry about the inconvenience! I made a mistake about the nvim version required for this plugin, actually it is required to have nvim nightly (>= 0.10.0) for dropbar.nvim to work since the vim.iter module is new feature introduced in nvim nightly. Thanks for reporting.
Description
Hello. I'm having a problem after installation.
Just after installing, I open a .js file and the error
attempt to call field 'iter' (a nil value)
appears.I search for the function iter in the codebase of the dropbar .lua files and comment the following code and all works perfectly.
The code is in
lua/sources/lsp.lua
line 288nvim version
NVIM v0.9.1
dropbar.nvim version
7ae61cc
Operating system and version
MacOS 13.3.1
Minimal config
Steps to reproduce
Expected behavior
Work without errors
Actual behavior
Additional information
No response
The text was updated successfully, but these errors were encountered: