diff options
| author | Fasamii <fasami0512@gmail.com> | 2026-06-24 21:00:31 +0200 |
|---|---|---|
| committer | Fasamii <fasami0512@gmail.com> | 2026-06-24 21:00:31 +0200 |
| commit | a67528071c42d7582303dd1bdf90b81afd1447a4 (patch) | |
| tree | f385c0a797827d61bae2be22996d43b83a6f9316 | |
| parent | efdc0d0f51426127f9ca549328372ec2ded2387a (diff) | |
| download | netrw-icons.nvim-a67528071c42d7582303dd1bdf90b81afd1447a4.tar.gz netrw-icons.nvim-a67528071c42d7582303dd1bdf90b81afd1447a4.tar.bz2 netrw-icons.nvim-a67528071c42d7582303dd1bdf90b81afd1447a4.tar.xz netrw-icons.nvim-a67528071c42d7582303dd1bdf90b81afd1447a4.tar.zst | |
Update README.md
| -rw-r--r-- | README.md | 38 | ||||
| -rw-r--r-- | lua/netrw-icons/init.lua | 1 |
2 files changed, 17 insertions, 22 deletions
@@ -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: " }, + -- for example: lua = { "WOAH: " }, + -- or: lua = {"WOAH: ", "Normal"}, + file = { - -- Reserved keys for special file types - dir = " ", -- Directory icon - sym = "", -- Symlink icon - exe = "", -- Executable icon - }, + -- 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" }, |
