kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only show tail directory in current working directory marker

petobens opened this issue · comments

Arch 5.15.11-arch2-1

Neovim version
NVIM v0.7.0-dev+764-g3e81c1f9b5

Nvim-tree version

Describe the bug/feature
I would like to only display the current (tail) folder in the marker at the top of window indicating the current directory. The rationale for this is that I use a narrow window width (40cols) and when moving around directories the innermost folder gets truncated. For instance in the GIF you can see that only ~/git-repos/private/dotfiles/nvim gets displayed even when the inner directory changes (to plugin-config or lua)

Peek 2021-12-25 15-04-root

:help g:nvim_tree_root_folder_modifier

Missed that one. A follow-up (two part) question/feature request then:

  1. How I can display both the parent and current dir? I tried playing with :h:t without success
  2. Is is it possible to play with the root folder format? I would like to display it with a leading symbol/icon as in: -> root_folder_info
  1. not sure how, play with the modifiers a bit :help filename-modifiers
  2. i don't think so, it uses fnamemodify under the hood
ezoic increase your site revenue