From 54af7e013d65ccf7dc7f4f943982771a620e87ec Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 11 Apr 2023 08:28:03 -0700 Subject: [PATCH] doc: put documentation of icon config parameters in correct place --- .github/generate.py | 6 +++++- README.md | 2 +- doc/oil.txt | 9 ++++++--- lua/oil/config.lua | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/generate.py b/.github/generate.py index 8477266..d6abe65 100755 --- a/.github/generate.py +++ b/.github/generate.py @@ -100,7 +100,11 @@ COL_DEFS = [ "*", 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( diff --git a/README.md b/README.md index 1824ed2..165bd53 100644 --- a/README.md +++ b/README.md @@ -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", diff --git a/doc/oil.txt b/doc/oil.txt index 08c3908..6c4f808 100644 --- a/doc/oil.txt +++ b/doc/oil.txt @@ -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", @@ -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 diff --git a/lua/oil/config.lua b/lua/oil/config.lua index 9a22d80..86d978e 100644 --- a/lua/oil/config.lua +++ b/lua/oil/config.lua @@ -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",