Skip to content

hachy/felir.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

felir.nvim

felir is a minimal floating file explorer for Neovim.

It provides a clean UI with optional preview support, basic file operations, and Git status indicators.

felir-screenshot

Features

  • Floating window file explorer
  • Single / Dual / Preview layouts
  • Expandable directory tree
  • File preview with CursorHold
  • File operations (create, rename, delete, copy, paste)
  • Marks operations
  • Git status icons (added/modified/deleted/untracked)
  • Optional file icons via nvim-web-devicons or mini.nvim

Installation

Using lazy.nvim:

{
  "hachy/felir.nvim",
  lazy = false,
  dependencies = { "nvim-tree/nvim-web-devicons" },
  opts = {},
}

Usage

Felir defines a user command:

:Feilr

This opens the floating explorer.

You can map it manually:

vim.keymap.set("n", "<Leader>e", "<Plug>(felir)")

Configuration

Default configuration:

require("felir").setup({
  layout = "single",
  mappings = {
    ["q"] = "close",
    ["<CR>"] = "open",
    ["l"] = "open",
    ["h"] = "up",
    ["t"] = "toggle_tree",
    ["z"] = "collapse_all",
    ["H"] = "go_root",
    ["~"] = "go_home",
    ["."] = "toggle_hidden",
    ["m"] = "toggle_mark",
    ["N"] = "create_file",
    ["K"] = "create_directory",
    ["r"] = "rename",
    ["d"] = "delete",
    ["c"] = "copy",
    ["y"] = "copy",
    ["x"] = "cut",
    ["p"] = "paste",
    ["S"] = "set_layout_single",
    ["<Tab>"] = "advance",
    -- ["<C-d>"] = "set_layout_dual",
    -- ["<Tab>"] = "focus_next_pane",
    ["<C-w>c"] = "close_active_pane",
    ["<C-w>q"] = "close_active_pane",
    ["X"] = "close_active_pane",
    ["P"] = "preview",
  },
  ui = {
    float = {
      height_ratio = 0.8,
      vertical_bias = 0.4,
      width_ratio = 0.6,
      min_width = 80,
      max_width = 120,
      min_dual_width = 60,
      max_dual_width = 160,
      dual_gap = 2,
    },
    indicator = {
      closed = "",
      open = "",
    },
    icon = {
      enabled = true,
    },
    git = {
      A = "", -- Added
      M = "", -- Modified
      D = "", -- Deleted
      R = "", -- Renamed
      U = "󰬝", -- Unmerged (Conflict)
      ["?"] = "", -- Untracked
      DIR = "", -- Dirty Directory
    },
  },
})

Default Keymaps

Key Action
<CR> / l Open file / enter dir
h Go up directory
q Close explorer
t Toggle directory tree
z Collapse all directories
. Toggle hidden files
m Toggle mark
N Create file
K Create directory
r Rename
d Delete
c / y Copy
x Cut
p Paste
P Preview
S Switch to single layout
X Close active pane

Preview mode

  • Preview updates automatically on CursorHold:
  • Only active in preview layout

Optional Dependencies

Icons are supported via:

Git integration requires:

  • git installed in your system

License

MIT

About

File explorer for nvim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages