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

Suggestions for more advanced sorting #358

Open
jorins opened this issue Feb 9, 2024 · 0 comments
Open

Suggestions for more advanced sorting #358

jorins opened this issue Feb 9, 2024 · 0 comments

Comments

@jorins
Copy link

jorins commented Feb 9, 2024

I have a directory that's currently sorted as:

dist/
node_modules/
src/
.eslintignore
.gitignore
.eslintrc.json
.prettierrc.json
package.json
tsconfig.json
README.md
.prettierignore
pnpm-lock.yaml
LICENSE

There's two things I'm noting that are a bit off here:

  • .prettierignore is kept separate from .eslintignore and .gitignore
  • README.md is separated from LICENSE.

I'd be very glad if CHADTree's sorting could get around this. I'm guessing the appropriate solution would be to add an additional category for chadtree_settings.view.sort_by, e.g. classification that would evaluate to different values based on regular expressions, for example

  • [A-Z]\w+file -> buildfile, matches e.g. Makefile, Dockerfile
  • \.\w*ignore -> ignorefile, matches e.g. .gitignore, .eslintignore
  • [A-Z]+(\.[a-z]+)? -> projectfile matches e.g. README.md, CONTRIBUTING, LICENSE
  • Fallback -> ""

Thank you for your work on this lovely project :)

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

No branches or pull requests

1 participant