Skip to content

Remove “/..” from root directory if “restrict_above_cwd” is enabled #1743

Closed
@alex-courtis

Description

@alex-courtis

Discussed in #1735

Originally posted by davilera November 9, 2022
Currently, nvim-tree’s default behavior is to append /.. to the root directory. This makes sense because the user can't browse one directory up. However, if actions.change_dir.restrict_above_cwd is enabled, this is no longer possible.

Therefore, I'd recommend appending /.. in local function format_root_name if, and only if, actions.change_dir.restrict_above_cwd is not enabled. IMO, this would result in a better UX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedQOLQuality Of Life Improvementfeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions