diff options
| author | Fasamii <fasami0512@gmail.com> | 2026-02-05 19:25:43 +0100 |
|---|---|---|
| committer | Fasamii <fasami0512@gmail.com> | 2026-02-05 19:25:43 +0100 |
| commit | d8df2abe655ec2468bf0f6ab898dd909f8c73479 (patch) | |
| tree | 5cdcb9ab3a7cad031684a81c5174d40b897fa2c9 | |
| parent | 6e17aeb0c1f26fcfac9c5a1bfd24234005da2bd3 (diff) | |
| download | netrw-icons.nvim-d8df2abe655ec2468bf0f6ab898dd909f8c73479.tar.gz netrw-icons.nvim-d8df2abe655ec2468bf0f6ab898dd909f8c73479.tar.bz2 netrw-icons.nvim-d8df2abe655ec2468bf0f6ab898dd909f8c73479.tar.xz netrw-icons.nvim-d8df2abe655ec2468bf0f6ab898dd909f8c73479.tar.zst | |
rename
| -rw-r--r-- | README.md | 48 | ||||
| -rw-r--r-- | lua/netrw-icons/init.lua (renamed from lua/netrw/init.lua) | 20 | ||||
| -rw-r--r-- | lua/netrw-icons/parse.lua (renamed from lua/netrw/parse.lua) | 8 |
3 files changed, 75 insertions, 1 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..bbbdb2c --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# netrw-icons.nvim + +An extension plugin for Neovim’s built-in `netrw` file explorer that adds: + +- File and directory icons +- LSP diagnostics indicators + +## Features + +- No replacement of `netrw` — pure extension +- File and directory icons inside `netrw` +- Supports multiple icon providers: + - `nvim-web-devicons` + - `mini.icons` +- LSP diagnostics integration + +## Requirements + +- Neovim ≥ 0.9 +- One of the following (optional): + - [`nvim-web-devicons`](https://github.com/nvim-tree/nvim-web-devicons) + - [`mini.icons`](https://github.com/echasnovski/mini.nvim) +- Neovim built-in LSP (optional, for diagnostics) + +## Installation + +Using `lazy.nvim`: + +```lua +{ + "yourname/netrw-plus.nvim", + dependencies = { + "nvim-tree/nvim-web-devicons", -- or "echasnovski/mini.nvim", + }, + config = function() + require("netrw-plus").setup({ + prefer = "devicons" + file = true, + dir = true, + lsp = { + info = false, + hint = false, + warn = true, + error = true, + } + }) + end, +} diff --git a/lua/netrw/init.lua b/lua/netrw-icons/init.lua index 379d5a1..608d479 100644 --- a/lua/netrw/init.lua +++ b/lua/netrw-icons/init.lua @@ -1,3 +1,11 @@ +-- SPDX-License-Identifier: MIT +-- +-- Copyright (c) 2026 Mikołaj Kozłowski +-- +-- Portions of this file are derived from: +-- prichrd/netrw.nvim (MIT) +-- https://github.com/prichrd/netrw.nvim + local M = {} local parse = require("netrw.parse") @@ -115,9 +123,19 @@ M.options = {} --- @class Config local default = { - prefer = nil, -- "miniicons" or "devicons" + -- Preferred icon provider: + -- nil -> auto-detect + -- "miniicons" -> use mini.icons + -- "devicons" -> use nvim-web-devicons + prefer = nil, + + -- Show icons for files file = true, + + -- Show icons for directories dir = true, + + -- LSP diagnostics integration lsp = { info = false, hint = false, diff --git a/lua/netrw/parse.lua b/lua/netrw-icons/parse.lua index c069dee..61460a0 100644 --- a/lua/netrw/parse.lua +++ b/lua/netrw-icons/parse.lua @@ -1,3 +1,11 @@ +-- SPDX-License-Identifier: MIT +-- +-- Copyright (c) 2026 Mikołaj Kozłowski +-- +-- Portions of this file are derived from: +-- prichrd/netrw.nvim (MIT) +-- https://github.com/prichrd/netrw.nvim + local M = {} M.TYPE_DIR = 0 |
