Comments (10)
Thanks, @alex-courtis. Unfortunately, no, I can only create files directly from nvim-tree
explorer. I will try to check on their side. Will close this and will reopen if necessarry.
from nvim-tree.lua.
Initial thoughts: this may be a file system notification issue. Does the folder show after you manually refresh R
or restart vim?
I don't have any knowledge about ssh file systems however I imagine that libuv would have issues. It's definitely not something that nvim-tree is aware of or can handle.
Suggestion: raise an issue with nosduco/remote-sshfs.nvim and see what ideas they have then we can talk further. I notice they copied our log subsystem :)
from nvim-tree.lua.
Upon further digging, this is definitely a nvim-tree
issue.
The issue arises solely with the nvim-tree
enabled, even when using the most basic clean configuration suggested by you (&pasted below), while mounting the folder with sshfs
then nvim --clean [ mounted dir ]
works.
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end
-- UNCOMMENT this block for diagnostics issues, substituting pattern and cmd as appropriate.
-- Requires diagnostics.enable = true in setup.
--[[
vim.api.nvim_create_autocmd("FileType", {
pattern = "lua",
callback = function()
vim.lsp.start { cmd = { "lua-language-server" } }
end,
})
]]
from nvim-tree.lua.
Hi, facing the same issue. I have successfully used this plugin for fuse mounted file system using sshfs before, so it broke in some recent commit.
from nvim-tree.lua.
Thank you, I can reproduce this with sshfs and default nvim-tree config. The directories are seen by nvim-tree, but not enumerated.
Top level contains only directories: in this case baz and foo are seen, 2 is not.
This behaviour is nondeterministic - sometimes baz and foo are not seen.
: ; find .
.
./baz
./baz/2
./foo
./foo/bar
./foo/bar/1
[2024-06-15 14:12:29] [profile] START core init /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:12:29] [profile] START git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:12:29] [profile] END git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs 3ms
[2024-06-15 14:12:29] [profile] START explore init /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:12:29] [profile] START explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz
[2024-06-15 14:12:29] [profile] END explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz 1ms
[2024-06-15 14:12:29] [profile] START explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/foo
[2024-06-15 14:12:29] [profile] END explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/foo 1ms
[2024-06-15 14:12:29] [profile] END explore init /home/alex/src/nvim-tree/r/2794/sfs 2ms
[2024-06-15 14:12:29] [profile] END core init /home/alex/src/nvim-tree/r/2794/sfs 7ms
[2024-06-15 14:12:29] [profile] START view open
[2024-06-15 14:12:29] [profile] END view open 4ms
[2024-06-15 14:12:29] [profile] START draw
[2024-06-15 14:12:29] [profile] END draw 0ms
open baz
[2024-06-15 14:12:34] [profile] START git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs/baz
[2024-06-15 14:12:34] [profile] END git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs/baz 5ms
[2024-06-15 14:12:34] [profile] START explore init /home/alex/src/nvim-tree/r/2794/sfs/baz
[2024-06-15 14:12:34] [profile] START explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz/2
[2024-06-15 14:12:34] [profile] END explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz/2 0ms
[2024-06-15 14:12:34] [profile] END explore init /home/alex/src/nvim-tree/r/2794/sfs/baz 0ms
[2024-06-15 14:12:34] [profile] START draw
[2024-06-15 14:12:34] [profile] END draw 0ms
Add a file 0 next to foo, no change.
from nvim-tree.lua.
git bisect shows this to be the first bad commit
from nvim-tree.lua.
It appears to be the fs_scandir_next that is failing. fs_stat seems reliable:
---@param handle uv.uv_fs_t
---@param cwd string
---@param node Node
---@param git_status table
local function populate_children(handle, cwd, node, git_status)
local node_ignored = explorer_node.is_git_ignored(node)
local nodes_by_path = utils.bool_record(node.nodes, "absolute_path")
local filter_status = filters.prepare(git_status)
while true do
local name, t, err = vim.loop.fs_scandir_next(handle)
log.line("dev", "child next %s %s %s", name, t, err)
if not name then
break
end
local abs = utils.path_join { cwd, name }
local res, ok, errr = vim.loop.fs_stat(abs)
log.line("dev", "child stat %s %s %s", res, ok, errr)
[2024-06-15 14:39:32] [profile] START core init /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:39:32] [watcher] Watcher:new '/home/alex/src/nvim-tree/r/2794/sfs' nil
[2024-06-15 14:39:32] [watcher] Event:new '/home/alex/src/nvim-tree/r/2794/sfs'
[2024-06-15 14:39:32] [watcher] Event:start '/home/alex/src/nvim-tree/r/2794/sfs'
[2024-06-15 14:39:32] [profile] START git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:39:32] [profile] END git toplevel git_dir /home/alex/src/nvim-tree/r/2794/sfs 2ms
[2024-06-15 14:39:32] [profile] START explore init /home/alex/src/nvim-tree/r/2794/sfs
[2024-06-15 14:39:32] [dev] child next baz nil nil
[2024-06-15 14:39:32] [dev] child stat table: 0x7b6359192200 nil nil
[2024-06-15 14:39:32] [profile] START explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz
[2024-06-15 14:39:32] [profile] END explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/baz 0ms
[2024-06-15 14:39:32] [dev] child next foo nil nil
[2024-06-15 14:39:32] [dev] child stat table: 0x7b63591937e8 nil nil
[2024-06-15 14:39:32] [profile] START explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/foo
[2024-06-15 14:39:32] [profile] END explore populate_children /home/alex/src/nvim-tree/r/2794/sfs/foo 0ms
[2024-06-15 14:39:32] [dev] child next nil nil nil
[2024-06-15 14:39:32] [dev] nodes_by_path {}
[2024-06-15 14:39:32] [profile] END explore init /home/alex/src/nvim-tree/r/2794/sfs 0ms
[2024-06-15 14:39:32] [profile] END core init /home/alex/src/nvim-tree/r/2794/sfs 4ms
[2024-06-15 14:39:32] [profile] START view open
[2024-06-15 14:39:32] [profile] END view open 4ms
[2024-06-15 14:39:32] [profile] START draw
[2024-06-15 14:39:32] [profile] END draw 0ms
from nvim-tree.lua.
git bisect shows this to be the first bad commit
Very interesting, it does look like the type detection was changed there.
Are you interested in creating a pull request to fix this one @rag-hav ? I reckon you're the best one to find real world test cases ;)
from nvim-tree.lua.
Will look into it, but I don't really have any experience with this.
from nvim-tree.lua.
Thanks mate! Dev and contribution docs.
from nvim-tree.lua.
Related Issues (20)
- Float window for full filenames has wrong bg HOT 2
- Floating nvim-tree does not respect config on startup HOT 14
- Right aligned icons HOT 1
- web-devicons default not used HOT 4
- Can't create a file in neovim using nvim-tree.lua(fs_close bad argument #1) HOT 6
- [NvimTree] Could not start the fs_event watcher for path /xxxx/xxxx : ENOSPC HOT 8
- Is it not in the AUR?(Have been solved) HOT 2
- Opening a tree in a new tab messes up local statusline settings HOT 6
- Colors of NvimTree as floating window different as expected (configured) HOT 2
- Unable to open file in new tab HOT 2
- nvim-web-devicons user overrides are clobbered HOT 1
- enable deprecated warnings, minimum neovim version 0.9, harden support for greater versions HOT 3
- Allow nodes to expand until a certain condition is met.
- Diagnostics Disabled flag seems do not work
- `nvim-tree` allows the creation of files over `sshfs`, but they can't be accessed HOT 3
- Allow icons to work with any terminal font HOT 1
- Sibling navigation doesn't work with group empty HOT 1
- filesystem_watchers.ignore_dirs and git.disable_for_dirs functions
- The path to open files is always displayed as an absolute path HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-tree.lua.