Skip to content

Commit

Permalink
doc: put documentation of icon config parameters in correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Apr 11, 2023
1 parent f6d2102 commit 54af7e0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ class ColumnDef:
"*",
False,
"An icon for the entry's type (requires nvim-web-devicons)",
HL + [],
HL
+ [
LuaParam("default_file", "string", "Fallback icon for files when nvim-web-devicons returns nil"),
LuaParam("directory", "string", "Icon for directories"),
],
),
ColumnDef("size", "files, ssh", False, "The size of the file", HL + []),
ColumnDef(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ require("oil").setup({
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
{ "icon", default_file = "", directory = "" },
"icon",
-- "permissions",
-- "size",
-- "mtime",
Expand Down
9 changes: 6 additions & 3 deletions doc/oil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ OPTIONS *oil-option
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
{ "icon", default_file = "", directory = " " },
"icon",
-- "permissions",
-- "size",
-- "mtime",
Expand Down Expand Up @@ -218,8 +218,11 @@ icon *column-ico
An icon for the entry's type (requires nvim-web-devicons)

Parameters:
{highlight} `string|fun(value: string): string` Highlight group, or
function that returns a highlight group
{highlight} `string|fun(value: string): string` Highlight group, or
function that returns a highlight group
{default_file} `string` Fallback icon for files when nvim-web-devicons
returns nil
{directory} `string` Icon for directories

size *column-size*
Adapters: files, ssh
Expand Down
2 changes: 1 addition & 1 deletion lua/oil/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local default_config = {
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
{ "icon", default_file = "", directory = "" },
"icon",
-- "permissions",
-- "size",
-- "mtime",
Expand Down

0 comments on commit 54af7e0

Please sign in to comment.