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
When add_blank_line_at_top = true a blank line is inserted at the top of the tree. When interacting with this blank like, for example using open or toggle, an exception is thrown.
Screenshots, Traceback
E5108: Error executing lua: ...d/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:682: attempt to index local 'node' (a nil value)
stack traceback:
...d/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:682: in function 'open_with_cmd'
...d/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:741: in function 'open'
...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:184: in function <...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:183>
Steps to Reproduce
Enable add_blank_line_at_top
Open :Neotree
Navigate to the blank line
Hit
Expected Behavior
Nothing should happen
Your Configuration
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
-- add any other plugins here
}
localneotree_config= {
"nvim-neo-tree/neo-tree.nvim",
dependencies= { "MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", "nvim-lua/plenary.nvim" },
cmd= { "Neotree" },
keys= {
{ "<Leader>e", "<Cmd>Neotree<CR>" }, -- change or remove this line if relevant.
},
opts= {
add_blank_line_at_top=true,
-- ...
},
}
table.insert(plugins, neotree_config)
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Please be careful not to hit an empty line is all I can say for now lol.
That empty head line option was added relatively recently and some parts of the code still assume that there is definitely a node for each line.
Did you check docs and existing issues?
Neovim Version (nvim -v)
NVIM v0.10.0-dev-e59cf3b3a
Operating System / Version
Ubuntu Mate 22.04
Describe the Bug
When
add_blank_line_at_top = true
a blank line is inserted at the top of the tree. When interacting with this blank like, for example usingopen
ortoggle
, an exception is thrown.Screenshots, Traceback
Steps to Reproduce
add_blank_line_at_top
:Neotree
Expected Behavior
Nothing should happen
Your Configuration
The text was updated successfully, but these errors were encountered: