feat: add sort_by "filetype" (#2302)
* feat: adds new type of sorting based on vim's filetype detection * fix(ft/sorter): fallbacks to C.name when both ft's are nil or equal * feat: adds new type of sorting based on vim's filetype detection --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -568,8 +568,8 @@ Reloads the explorer every time a buffer is written to.
|
||||
|
||||
*nvim-tree.sort_by*
|
||||
Changes how files within the same directory are sorted.
|
||||
Can be one of `name`, `case_sensitive`, `modification_time`, `extension` or a
|
||||
function.
|
||||
Can be one of `name`, `case_sensitive`, `modification_time`, `extension`,
|
||||
`filetype` or a function.
|
||||
Type: `string` | `function(nodes)`, Default: `"name"`
|
||||
|
||||
Function may perform a sort or return a string with one of the above
|
||||
@@ -577,6 +577,7 @@ function.
|
||||
- `absolute_path`: `string`
|
||||
- `executable`: `boolean`
|
||||
- `extension`: `string`
|
||||
- `filetype`: `string`
|
||||
- `link_to`: `string`
|
||||
- `name`: `string`
|
||||
- `type`: `"directory"` | `"file"` | `"link"`
|
||||
|
||||
Reference in New Issue
Block a user