From a67528071c42d7582303dd1bdf90b81afd1447a4 Mon Sep 17 00:00:00 2001 From: Fasamii Date: Wed, 24 Jun 2026 21:00:31 +0200 Subject: Update README.md --- README.md | 40 +++++++++++++++++----------------------- lua/netrw-icons/init.lua | 1 + 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 46204c4..cc17ab6 100644 --- a/README.md +++ b/README.md @@ -58,42 +58,34 @@ Plug 'Fasamii/netrw-icons.nvim' lua require("netrw-icons").setup() ``` - ## Configuration ### Default Configuration ```lua require("netrw-icons").setup({ - -- Icon provider preference: "devicons", "miniicons", or nil for auto-detect - prefer = nil, + -- Icon provider preference: "devicons", "miniicons", or nil for auto-detect + prefer = nil, - -- Show generic file icon when no specific icon is found for a file type - icon_fallback = true, + -- Show generic file icon when no specific icon is found for a file type + icon_fallback = true, - -- Icon definitions - file = { -- If you don't have any overrides you can just set to true -- Custom icons per file extension -- Can be a string (icon only) or a table { icon, highlight_group } - -- for example: lua = {"WOAH: ", "Function"}, - -- or lua = { "WOAH: " }, - - -- Reserved keys for special file types - dir = " ", -- Directory icon - sym = "", -- Symlink icon - exe = "", -- Executable icon - }, + -- for example: lua = { "WOAH: " }, + -- or: lua = {"WOAH: ", "Normal"}, + file = { + + -- Reserved keys for special file types + dir = " ", -- Directory icon + sym = { " ", "Special" }, -- Symlink icon + exe = " ", -- Executable icon + }, }) ``` ### Configuration Examples -#### Minimal Setup - -```lua -require("netrw-icons").setup() -``` - #### Prefer Specific Icon Provider ```lua @@ -109,14 +101,14 @@ require("netrw-icons").setup({ file = { dir = " ", sym = " ", - exe = "EXEHERE: ", + exe = "EXE FILE HERE: ", - -- String format (icon only) lua = "LUA ---->", md = " ", -- Table format (icon + highlight group) ts = { "󰛦 ", "Type" }, + js = { "󰛦 ", "Keyword" }, }, }) ``` @@ -152,6 +144,8 @@ To set style of netrw: let g:netrw_liststyle = 3 " or 0 or 1 ``` +Or for neovim: + ```lua -- In init.lua vim.g.netrw_liststyle = 3 -- or 0 or 1 diff --git a/lua/netrw-icons/init.lua b/lua/netrw-icons/init.lua index 0fd8edb..9c031ef 100644 --- a/lua/netrw-icons/init.lua +++ b/lua/netrw-icons/init.lua @@ -135,6 +135,7 @@ local default = { prefer = nil, icon_fallback = true, + file = { dir = " ", sym = { " ", "Special" }, -- cgit v1.3