doc: improve documentation for set_sort (#401)
This commit is contained in:
parent
15e071f203
commit
d3a365c950
3 changed files with 17 additions and 5 deletions
|
|
@ -60,8 +60,13 @@ Change the display columns for oil
|
||||||
Change the sort order for oil
|
Change the sort order for oil
|
||||||
|
|
||||||
| Param | Type | Desc |
|
| Param | Type | Desc |
|
||||||
| ----- | ---------- | ---- |
|
| ----- | ---------------- | ------------------------------------------------------------------------------------- |
|
||||||
| sort | `string[]` | [] |
|
| sort | `oil.SortSpec[]` | List of columns plus direction. See :help oil-columns to see which ones are sortable. |
|
||||||
|
|
||||||
|
**Examples:**
|
||||||
|
```lua
|
||||||
|
require("oil").set_sort({ { "type", "asc" }, { "size", "desc" } })
|
||||||
|
```
|
||||||
|
|
||||||
## set_is_hidden_file(is_hidden_file)
|
## set_is_hidden_file(is_hidden_file)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,12 @@ set_sort({sort}) *oil.set_sor
|
||||||
Change the sort order for oil
|
Change the sort order for oil
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
{sort} `string[]` []
|
{sort} `oil.SortSpec[]` List of columns plus direction. See :help oil-
|
||||||
|
columns to see which ones are sortable.
|
||||||
|
|
||||||
|
Examples: >lua
|
||||||
|
require("oil").set_sort({ { "type", "asc" }, { "size", "desc" } })
|
||||||
|
<
|
||||||
|
|
||||||
set_is_hidden_file({is_hidden_file}) *oil.set_is_hidden_file*
|
set_is_hidden_file({is_hidden_file}) *oil.set_is_hidden_file*
|
||||||
Change how oil determines if the file is hidden
|
Change how oil determines if the file is hidden
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,9 @@ M.set_columns = function(cols)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Change the sort order for oil
|
---Change the sort order for oil
|
||||||
---@param sort string[][]
|
---@param sort oil.SortSpec[] List of columns plus direction. See :help oil-columns to see which ones are sortable.
|
||||||
|
---@example
|
||||||
|
--- require("oil").set_sort({ { "type", "asc" }, { "size", "desc" } })
|
||||||
M.set_sort = function(sort)
|
M.set_sort = function(sort)
|
||||||
require("oil.view").set_sort(sort)
|
require("oil.view").set_sort(sort)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue