Open aadi58002 opened 1 year ago
I think this is a pretty solid feature to have.
Just showing symlinked files/folder would be trivially easy. Showing where the symlink points to would be a little bit more work.
One concern I have is that we don't currently have a good "ecosystem" around navigating symlinks. Currently we use the realpath(3)
of a given path (so symlinks will also be expanded and followed). Navigating back from a symlink actually just takes you one directory up rather than back.
So there will probably be a need for new options and actions to support the navigation to/from symlinks. This will take the most work I think. It won't be anything crazy but without this "ecosystem" showing symlinks might not be a great experience.
I'll be pretty busy over the next few months. I'm not sure if I'll have the capacity for new features. PRs are welcome.
I think the behavior you described is most practical way the folder links can work.It will work very nicely for my workflow. Sadly i am not too familiar with either neovim or the lua language. I will try to implement it but not sure how long it might take. Thanks for the quick response and the guideline to implement the feature.Also great extension thanks for creating and maintaining it.
I'm not sure if following symlink by default is ideal though. cd
doesn't follow symlink by default and neither does netrw.
I think ideally to have symlinks as part of this plugin, we probably want:
show_symlink
(boolean for whether to show symlinks) & follow_symlink
(boolean for whether <cr>
on a symlink will follow it)cd
and cd_physical
(for cd
and cd -P
respectively)If you're interested in trying to implement these, I can try to help you through it. In the meantime, if you wanna try out showing symlinks yourself, you can fork this repo and add something like
table.insert(args, "--type")
table.insert(args, "symlink")
edit: adding the --type symlink
flag to folder browser might cause some issues when coupled with git status
@jamestrew I think a good and quick short-term workaround would be to enable showing symlinked files/folder, when the user has fd
installed. The way we could do this is by introducing a config option follow_symlinks
(which only works in the presence of fd
), and use a block of code such as:
if opts.follow_symlinks then
table.insert(args, "--follow")
end
somewhere after here:
Would it be alright if I make a PR for this?
@rashil2000 sounds good. go for it thanks.
I was looking forward to this, thanks.
Issue is still there The PR seems to hang during code review :(
Description
I use stow to manage my config file. All the folders which stow has symlinked are not visible inside the directory view.
Neovim version
Operating system and version
Void Linux
Steps to reproduce
Expected behavior
It expected to show symlinks like (Like in the screen shot) with a arrow and path of the link.It can also show them as just regular folders or files.
Actual behavior
Symlinks are ignored and not visible in the default view
Minimal config