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
follow_current_file does not work at a directory that containing a large number of subdirectories and files,such as a Linux source code tree
Screenshots, Traceback
Screencast.2024-03-21.17.50.06.mp4
Steps to Reproduce
1.set "follow_current_file = { enabled = true },"
2.open vim in a linux source code tree and open neo tree
3.run "/" find "file.c" and select by "c-n" and "" open it
Expected Behavior
neo tree can focus the "file.c" that opened by
Your Configuration
{
"nvim-neo-tree/neo-tree.nvim",
branch="v3.x",
cmd="Neotree",
keys= {
{
"<leader>n",
function()
require("neo-tree.command").execute({ toggle=true, dir=vim.loop.cwd() })
end,
desc="Explorer NeoTree (cwd)",
},
{
"<leader>r",
"<cmd>Neotree reveal<CR>",
desc="Explorer NeoTree (cwd)",
},
},
init=function()
ifvim.fn.argc(-1) ==1thenlocalstat=vim.loop.fs_stat(vim.fn.argv(0))
ifstatandstat.type=="directory" thenrequire("neo-tree")
endendend,
opts= {
close_if_last_window=true,
resize_timer_interval=1000,
sources= { "filesystem", "buffers", "git_status", "document_symbols" },
source_selector= {
winbar=true,
sources= {
{ source="filesystem" },
{ source="buffers" },
{ source="remote" },
},
},
open_files_do_not_replace_types= { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem= {
bind_to_cwd=true,
follow_current_file= { enabled=true },
use_libuv_file_watcher=true,
},
window= {
position="left",
width=30,
mappings= {
["<s-Tab>"] ="prev_source",
["<Tab>"] ="next_source",
},
},
default_component_configs= {
indent= {
with_expanders=true, -- if nil and file nesting is enabled, will enable expandersexpander_collapsed="",
expander_expanded="",
expander_highlight="NeoTreeExpander",
},
},
},
dependencies= {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
{
"s1n7ax/nvim-window-picker",
version="2.*",
config=function()
require("window-picker").setup({
filter_rules= {
include_current_win=false,
autoselect_one=true,
-- filter using buffer optionsbo= {
-- if the file type is one of following, the window will be ignoredfiletype= { "neo-tree", "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignoredbuftype= { "terminal", "quickfix" },
},
},
})
end,
},
},
config=function(_, opts)
require("neo-tree").setup(opts)
end,
},
The text was updated successfully, but these errors were encountered:
This is reproducible and unfortunately I think this is very difficult to fix.
@zaiqiang-dong Will it start following current file when you go to a different file and then come back? (I assume the answer is yes) and this is the only easy way to restart follow-current-file.
I'm currently doing a rewrite that should make search and async code work smoothly so please wait till it's done for a real solution: #1340 (comment)
+1
I hit the same issue, even when the file name is unique. A lot of files and deep nesting leads to the follow_current_file not doing anything. Works on small codebase, but on a larger one it fails silently
Did you check docs and existing issues?
Neovim Version (nvim -v)
0.9.5
Operating System / Version
20.04.1-Ubuntu
Describe the Bug
follow_current_file does not work at a directory that containing a large number of subdirectories and files,such as a Linux source code tree
Screenshots, Traceback
Screencast.2024-03-21.17.50.06.mp4
Steps to Reproduce
1.set "follow_current_file = { enabled = true },"
2.open vim in a linux source code tree and open neo tree
3.run "/" find "file.c" and select by "c-n" and "" open it
Expected Behavior
neo tree can focus the "file.c" that opened by
Your Configuration
The text was updated successfully, but these errors were encountered: