Skip to content

feat: add sort_by "suffix" #2307

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

Merged
merged 6 commits into from
Jul 9, 2023

Conversation

moniquelive
Copy link
Collaborator

No description provided.

@alex-courtis
Copy link
Member

Thanks for the contribution. I'll review next weekend.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

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

This works, many thanks for your contribution:

master extension:

  ~/2288/..                   │
     00-env.bat.conf         │~
     00-env.conf             │~
     01-secrets.conf         │~
     02-autostart.conf       │~
     03-hardware.conf        │~
     00-env.java.conf        │~
     00-env.kitty.conf       │~
     00-env.nvim.conf        │~
     00-env.xanmod.conf      │~

branch suffix:

  ~/2288/..                   │
     00-env.bat.conf         │~
     00-env.conf             │~
     00-env.java.conf        │~
     00-env.kitty.conf       │~
     00-env.nvim.conf        │~
     00-env.xanmod.conf      │~
     01-secrets.conf         │~
     02-autostart.conf       │~
     03-hardware.conf        │~

Can be one of `"name"`, `"case_sensitive"`, `"modification_time"`, `"extension"`,
`"suffix"`, `"filetype"` or a function.
`"extension"` uses all suffixes e.g. `foo.tar.gz` -> `.tar.gz`
`"suffix"` uses the last e.g. `.gz`
Type: `string` | `function(nodes)`, Default: `"name"`

Function may perform a sort or return a string with one of the above
Copy link
Member

Choose a reason for hiding this comment

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

I removed suffix from the node; it's more complex to calculate and users can do it themselves if they feel the need.

@alex-courtis alex-courtis changed the title feat: adds new type of sorting based on the filename's suffix feat: add sort_by "suffix" Jul 9, 2023
@alex-courtis alex-courtis merged commit a708bd2 into nvim-tree:master Jul 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants