Adding the show symlink option to finder#323
Conversation
|
I actually wanted to implement something similar to But i have faced a roadblock and wanted ways of implementing it. Ps i am new to neovim and lua. So any advice would be greatly helpful.
Above is the error which i was getting when i tried to use a vim.loop or plenary.async function in the make_entry function |
|
Sorry for the late response. We can get the path of the symlink using a libuv function We can make the call to it similar to how we call Then we should be able to just modify |
|
I inspected the entry element in the make_entry file and saw that lstat and the stat values on the entry is always same despite the file being a link or not. I don't think this is a desired behavior (maybe). diff --git a/lua/telescope/_extensions/file_browser/make_entry.lua b/lua/telescope/_extensions/file_browser/make_entry.lua
index b8cf898..f99203f 100644
--- a/lua/telescope/_extensions/file_browser/make_entry.lua
+++ b/lua/telescope/_extensions/file_browser/make_entry.lua
@@ -124,6 +124,8 @@ local make_entry = function(opts)
local display_array = {}
local icon, icon_hl
local is_dir = entry.Path:is_dir()
+
+ print(vim.inspect(entry.lstat))
-- entry.ordinal is path excl. cwd
local tail = fb_utils.trim_right_os_sep(entry.ordinal)
-- path_display plays better with relative pathsThis line and :messages to inspect the element ( i don't know if there is a better way 😄 ) I would like to make it so that lstat and stat are properly set but i don't know where there values get |
|
I tried putting this in the same line vim.print { path = entry.path, _type = entry.lstat.type }and it's showing |
|
It seems the --follow treats symlinks as directories Any suggestion of how we can approach this problem ? |
|
I see two ways the
I think with the In terms of cd'ing and opening files, Does that make sense? So you'll have to adjust which path ^ |
|
Sorry about this made a little mistake with git and deleted the remote branch i reopened a new PR #334 i also made a pseudo working example which shows the link. It behaves the same way as I am not confident in the implementation there might be some bug which i can't see immediately. I would like your opinion on how to further refine the implementation. Also I am very thankful for the time and advice you (@jamestrew) have given me over this issue.Thanks for pointing to the exact file location where changes would be made for the implementation.it has been a great experience to work on this issue thank. |








Addresses the issue #300