Skip to content

WayenVan/fyler.nvim

 
 

Repository files navigation




fyler-logo


Fyler.nvim

A file manager for Neovim
License Stars
Showcase

Installation

Important

Please be careful while choosing between stable and latest version.

  • stable branch updates on releases.
  • stable version documentation might be different.
  • main branch updates frequently(can have bugs).

Stable version

Note

Please refer to stable version documentation page. Latest version documentation might not be compatible for stable version.

Lazy.nvim (recommended)
{
  "A7Lavinraj/fyler.nvim",
  dependencies = { "nvim-mini/mini.icons" },
  branch = "stable",
  opts = {}
}
Mini.deps
add({
  source = "A7Lavinraj/fyler.nvim",
  depends = { "nvim-mini/mini.icons" },
  checkout = "stable",
})

Latest version

Lazy.nvim (recommended)

You can use default setup with mini.icons

{
  "A7Lavinraj/fyler.nvim",
  dependencies = { "nvim-mini/mini.icons" },
  opts = {}
}

Or change to nvim-web-devicons

{
  "A7Lavinraj/fyler.nvim",
  dependencies = { "nvim-tree/nvim-web-devicons" },
  opts = {
    icon_provider = "nvim-web-devicons",
  }
}
Mini.deps
add({
  source = "A7Lavinraj/fyler.nvim",
  depends = { "nvim-mini/mini.icons" },
})
add({
  source = "A7Lavinraj/fyler.nvim",
  depends = { "nvim-tree/nvim-web-devicons" },
})
(Default configuration)
local defaults = {
  hooks = {
    on_delete = nil, -- function(path) end
    on_rename = nil, -- function(src_path, dst_path) end
    on_highlights = nil -- function(hl_groups, palette) end
  },
  -- Changes icon provider
  icon_provider = "mini-icons",
  -- Changes mappings for associated view
  mappings = {
    explorer = {
      ["q"] = "CloseView",
      ["<CR>"] = "Select",
      ["<C-t>"] = "SelectTab",
      ["|"] = "SelectVSplit",
      ["-"] = "SelectSplit",
      ["^"] = "GotoParent",
      ["="] = "GotoCwd",
      ["."] = "GotoNode",
    },
    confirm = {
      ["y"] = "Confirm",
      ["n"] = "Discard",
    },
  },
  -- Changes configuration for associated view
  views = {
    confirm = {
      win = {
        -- Changes window border
        border = "single",
        -- Changes buffer options
        buf_opts = {
          -- buffer options
        },
        -- Changes window kind
        kind = "float",
        -- Changes window kind preset
        kind_presets = {
          -- values can be "(0,1]rel" or "{1...}abs"

          -- <preset_name> = {
          --   height = "",
          --   width = "",
          --   top = "",
          --   left = ""
          -- }

          -- float = {
          --   height = "0.3rel",
          --   width = "0.4rel",
          --   top = "0.3rel",
          --   left = "0.3rel"
          -- },
        },
        -- Changes window options
        win_opts = {
          -- window options
        },
      },
    },
    explorer = {
      -- Changes explorer closing behaviour when a file get selected
      close_on_select = true,
      -- Changes explorer behaviour to auto confirm simple edits
      confirm_simple = false,
      -- Changes explorer behaviour to hijack NETRW
      default_explorer = false,
      -- Changes git statuses visibility
      git_status = true,
      -- Changes Indentation marker properties
      indentscope = {
        enabled = true,
        group = "FylerIndentMarker",
        marker = "",
      },
      -- Auto current buffer tracking
      track_current_buffer = true,
      win = {
      -- Changes window border
        border = "single",
      -- Changes buffer options
        buf_opts = {
          -- buffer options
        },
      -- Changes window kind
        kind = "replace",
      -- Changes window kind preset
        kind_presets = {
          -- values can be "(0,1]rel" or "{1...}abs"

          -- <preset_name> = {
          --   height = "",
          --   width = "",
          --   top = "",
          --   left = ""
          -- }

          -- replace = {},
        },
      -- Changes window options
        win_opts = {
          -- window options
        },
      },
    },
  },
}

Usage

You can either open Fyler by Fyler command

:Fyler             " Open with default options
:Fyler kind=<kind> " Open with specific window kind
:Fyler cwd=<path>  " Open with specific directory

Or using lua api

local fyler = require("fyler")

-- Open with default options
fyler.open()

-- Open with specific directory
fyler.open({ cwd = "~/" })

-- Open with specific kind
fyler.open({ kind = "split_left_most" })

TODOS

  • Basic operations CREATE | DELETE | MOVE | COPY
  • GIT integration
  • Indentation guides
  • LSP integration
  • NETRW Hijacking
  • Public APIs
  • Track current buffer
  • User command
  • File system watching
  • Fuzzy finding
  • SSH integration

Have problems with fyler.nvim?

  1. Search for existing issues
  2. If related issue is not there then open a new one

Want to contribute to this project?

Similar plugins

Codebase inspiration

Special thanks to all contributors

Contributors

About

A neovim file manager which can edit file system like a buffer with tree view

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 99.1%
  • Makefile 0.9%