Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Conversation

CrossR
Copy link
Member

@CrossR CrossR commented Aug 30, 2018

This adds a flag for showing hidden files, and files in hidden folders.

By default, you can't see any hidden files, nor any files in hidden folders which can be a pain, since for example in my dotfiles, most of the files are stored in "hidden" folders, such as .config folders.

I've left it to disabled for now, but we may want to just always show them?

@codecov
Copy link

codecov bot commented Aug 31, 2018

Codecov Report

Merging #2531 into master will increase coverage by 0.2%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2531     +/-   ##
=========================================
+ Coverage   44.51%   44.71%   +0.2%     
=========================================
  Files         351      352      +1     
  Lines       14302    14318     +16     
  Branches     1865     1863      -2     
=========================================
+ Hits         6367     6403     +36     
+ Misses       7709     7689     -20     
  Partials      226      226
Impacted Files Coverage Δ
browser/src/Services/Search/SearchProvider.ts 12.19% <ø> (ø) ⬆️
...src/Services/Configuration/DefaultConfiguration.ts 87.5% <ø> (ø) ⬆️
browser/src/Services/Search/RipGrep.ts 36.36% <33.33%> (-3.64%) ⬇️
browser/src/UI/components/SidebarItemView.tsx 56.25% <0%> (-10.42%) ⬇️
browser/src/Services/Explorer/ExplorerView.tsx 54.54% <0%> (-5.46%) ⬇️
...rowser/src/UI/components/VersionControl/Branch.tsx 91.3% <0%> (-5%) ⬇️
...rowser/src/UI/components/VersionControl/Staged.tsx 96% <0%> (-0.16%) ⬇️
...r/src/Services/Snippets/SnippetVariableResolver.ts 66.66% <0%> (ø) ⬆️
browser/src/UI/components/VersionControl/File.tsx 78.57% <0%> (ø) ⬆️
browser/src/Services/Explorer/ExplorerSplit.tsx 23.68% <0%> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5beff5f...711dccf. Read the comment docs.

akinsho
akinsho previously approved these changes Aug 31, 2018
Copy link
Member

@akinsho akinsho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@badosu
Copy link
Collaborator

badosu commented Aug 31, 2018

I agree, for a coding tool it does not make sense to not be able to see dotfiles.

I would even argue that it should be on by default, but having the configuration is enough.

Any chance we can have this option to impact the File Explorer too? I can't edit important files such as .env, .rubocop.yml, etc..

@akinsho
Copy link
Member

akinsho commented Aug 31, 2018

I agree with @badosu this should be on by default imho 🤷‍♂️ (its very confusing behaviour that expected files are hidden in a code editor)

@CrossR
Copy link
Member Author

CrossR commented Aug 31, 2018

I added it as a config option based on the fact there was a TODO there for it, but now that I look at it, that TODO was added as part of refactoring the Quick Open menu out, such that it could be used for the "Find in files" functionality.

Perhaps @TalAmuyal could explain what they think is the best approach. Currently, I've just set it as a flag for both the QuickOpen and find in files (since I'd want it for both), but potentially that isn't the best approach?

I also noticed that as part of that PR, the "--case-sensitive" flag was removed, which I didn't think much of at the time, since I thought the filtering would help on our end, but I've now realised that its causing some weird results with the quick open as well....Maybe that should be reverted, since the results are less relevant, and also it gives Oni more files to process when the processing is fairly expensive.

EDIT:

For clarity, the --hidden flag will allow hidden folders/files to be seen, but since ripgrep uses a projects .gitignore by default, I don't see any issue with including it always? It would only show files the user wants to my knowledge. The only issue I can see is it may attempt to search the .git folder, but thats easily fixed with --glob "!.git/*" to not glob the git folder.

@badosu
Copy link
Collaborator

badosu commented Aug 31, 2018

I also noticed that as part of that PR, the "--case-sensitive" flag was removed, which I didn't think much of at the time, since I thought the filtering would help on our end, but I've now realised that its causing some weird results with the quick open as well....Maybe that should be reverted, since the results are less relevant, and also it gives Oni more files to process when the processing is fairly expensive

See: #825

For clarity, the --hidden flag will allow hidden folders/files to be seen, but since ripgrep uses a projects .gitignore by default, I don't see any issue with including it always? It would only show files the user wants to my knowledge. The only issue I can see is it may attempt to search the .git folder, but thats easily fixed with --glob "!.git/*" to not glob the git folder

Yes, I think everyone agrees with having the hidden option, the proposal it being turned on by default.

@CrossR
Copy link
Member Author

CrossR commented Sep 2, 2018

I've swapped this over to enabled by default, but left the config option in "just in case".
I don't know of a reason why it wouldn't be needed..but still.

If @TalAmuyal is free anytime soon, it may be worth just waiting before merging to check I'm not being stupid here.

@CrossR
Copy link
Member Author

CrossR commented Sep 20, 2018

Should probably just get this merged since there has been no opposition, could I get a re-review?

Copy link
Member

@akinsho akinsho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CrossR CrossR merged commit 6af7221 into onivim:master Sep 27, 2018
@badosu
Copy link
Collaborator

badosu commented Sep 27, 2018

@CrossR Can you describe this option in the wiki?

@CrossR
Copy link
Member Author

CrossR commented Sep 27, 2018

@badosu Done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants