Skip to content

It's not because we use netrw that we cannot have nice things!

License

Notifications You must be signed in to change notification settings

ArisPodotas/netrw.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netrw.nvim

It's not because we use netrw that we cannot have nice things! This plugin adds a layer of ✨bling✨ and configuration to your favorite file explorer.

image

Features

  • Print file icons in the sign column
  • Configure custom actions with keybinds

Requirements

Installing

Install the plugin with your preferred package manager:

vim-plug

Plug 'prichrd/netrw.nvim'

packer

use 'prichrd/netrw.nvim'

Usage

Enable the plugin:

require'netrw'.setup{
  -- Put your configuration here, or leave the object empty to take the default
  -- configuration.
  icons = {
    symlink = '', -- Symlink icon (directory and file)
    directory = '', -- Directory icon
    file = '', -- File icon
  },
  use_devicons = true, -- Uses nvim-web-devicons if true, otherwise use the file icon specified above
  mappings = {}, -- Custom key mappings
}

Custom key mappings:

require'netrw'.setup{
  -- your config ...

  -- Define normal mode mapping
  mappings = {
    -- Function mappings
    ['p'] = function(payload)
      -- Payload is an object describing the node under the cursor, the object
      -- has the following keys:
      -- - dir: the current netrw directory (vim.b.netrw_curdir)
      -- - node: the name of the file or directory under the cursor
      -- - link: the referenced file if the node under the cursor is a symlink
      -- - extension: the file extension if the node under the cursor is a file
      -- - type: the type of node under the cursor (0 = dir, 1 = file, 2 = symlink)
      -- - col: the column of the node (for liststyle 3)
      print(vim.inspect(payload))
    end,
    -- String command mappings
    ['<Leader><Tab>'] = ":echo 'string command'<CR>",
    -- more mappings ...
  }
  -- your config ...
}

The plugin documentation can be found at doc/netrw.nvim.txt. You can also use the :help netrw.nvim command inside of Neovim.

Contributing

This project accepts contributions. Feel free to open issues for questions, feature ideas, bugs, etc. Before submitting a PR, make sure you run make lint with stylua and luacheck installed.

About

It's not because we use netrw that we cannot have nice things!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 97.9%
  • Makefile 2.1%