Skip to content

Option to use file/directory names instead of absolute paths for notifications #2270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asror1 opened this issue Jun 13, 2023 · 2 comments · Fixed by #2286
Closed

Option to use file/directory names instead of absolute paths for notifications #2270

asror1 opened this issue Jun 13, 2023 · 2 comments · Fixed by #2286
Labels
feature request PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated QOL Quality Of Life Improvement

Comments

@asror1
Copy link
Contributor

asror1 commented Jun 13, 2023

Issue

When using a notification plugin like vim-notify that has floating window notifications, using absolute paths in the messages of the notifications take up too much of the available horizontal window space, which could be quite distracting.

Feature Request

Having shorter notification messages that will take up less of the window space when using notification manager plugin with floating windows.

Potential Solution

Adding a boolean option to opts.notify that will be set to false by default. When enabled it will have the file system actions use file/directory names in the notification messages, and use absolute paths by default.

Drawbacks

When the option for using file/directory names is enabled, people who are using nvim-tree.api, more specifically the file system actions API, without visual context of the current file system, the notification messages might be quite ambiguous if there are files or directories with the same name within their file system. However, I don't believe that this is a significant limitation by any means, since the proposed solution will not be a breaking change.

References

#2266

@alex-courtis alex-courtis added PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated QOL Quality Of Life Improvement labels Jun 18, 2023
@alex-courtis
Copy link
Member

Perhaps the option might be notify.absolute_path, defaulting to true.

@asror1
Copy link
Contributor Author

asror1 commented Jun 18, 2023

Perhaps the option might be notify.absolute_path, defaulting to true.

Yup, that does read slightly better than notify.name_only. I'll change it in my implementation. I'll raise a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated QOL Quality Of Life Improvement
Projects
None yet
2 participants