Skip to content
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

FEATURE: Always show files tracked by git #1154

Open
1 task done
fschoenm opened this issue Sep 15, 2023 · 5 comments
Open
1 task done

FEATURE: Always show files tracked by git #1154

fschoenm opened this issue Sep 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@fschoenm
Copy link

Did you check the docs?

  • I have read all the docs.

Is your feature request related to a problem? Please describe.

I tried to find a solution but it doesn't seem possible at the moment?

I know that I can manually add some hidden files to the always_show list of files/directories but there doesn't seem to be a way to always show all files that are tracked by git but still hide untracked dotfiles or other hidden files.

Describe the solution you'd like.

Add a mode always_show_git_tracked or similar to show files that are tracked by git.

Describe alternatives you've considered.

No response

Additional Context

No response

@fschoenm fschoenm added the enhancement New feature or request label Sep 15, 2023
@wookayin
Copy link
Contributor

wookayin commented Oct 2, 2023

+1

Or use additional option for hide_dotfiles rather than creating a new option:

  filtered_items = {
          hide_dotfiles = true,  -- true(='always') | 'untracked' | false(='never')
  }

My proposal is to have hide_dotfiles = "untracked" by default, i.e., hide a .dotfile if it is untracked. If it's git-tracked or not-git-ignored, then the files won't be hidden. This should also be the sensible default behavior.

@cseickel
Copy link
Contributor

cseickel commented Oct 3, 2023

The problem I have with that is that it seems like complexity we have already solved with the always_show option. Wouldn't the dotfiles that are tracked by git be a very limited set of files with known names?

always_show = { -- remains visible even if other settings would normally hide it
--".gitignored",
},

I would prefer adding an always_show_by_pattern feature if that is enough to handle the real world examples of dotfiles tracked by git.

@wookayin
Copy link
Contributor

wookayin commented Oct 3, 2023

The files that should be shown are project-dependent and therefore it doesn't make much sense to put the list of such files into neovim configs. The information has to be read (during runtime) from the git repository (like git ls-files). I believe this problem is closer to controlling the degree of hiding .dotfiles taking git VCS into account.

@fschoenm
Copy link
Author

fschoenm commented Oct 3, 2023

There can be a lot of patterns for dotfiles, depending on which project types you're working with. Maybe you even want to commit sometimes your project configuration dotfiles and sometimes not.

IMO using git tracked files is a very user friendly, common sense solution for this problem that has the added benefit that it works out of the box.

@cseickel
Copy link
Contributor

cseickel commented Oct 3, 2023

OK, you've convinced me. I think @wookayin's suggestion make sense:#1154 (comment)

If someone wants to implement this, I will accept the PR. It's not a high priority for me personally though so I don't think I would get to it any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants