chadtree
chadtree copied to clipboard
Suggestions for more advanced sorting
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 fromLICENSE
.
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 :)