fyler.nvim Documentation

repository·main·Indexed 20 days ago

https://github.com/fylerorg/fyler.nvim

A file manager for Neovim inspired by oil.nvim that allows users to manipulate the file system as a Neovim buffer with a tree-like representation. Requires Neovim >= 0.11.

Tokens
506
Snippets
3
Records
3
Agent score
23%

What's inside fyler.nvim

  1. Install Fyler.nvim

    main

    Fyler.nvim requires Neovim >= 0.11. You can install it using your preferred plugin manager:

    lazy.nvim

    { 'FylerOrg/fyler.nvim', opts = {} }

    mini.deps

    require('mini.deps').add('FylerOrg/fyler.nvim')

    vim.pack

    vim.pack.add({ 'https://github.com/FylerOrg/fyler.nvim' })
  2. Open Fyler using the Lua API

    main

    For programmatic access or custom keybindings, use the fyler.open() function. It accepts an options table.

    API Options

    • root_path: A string representing the directory to open.
    • kind: A string specifying how the window should be opened (e.g., "split_left_most").

    Usage Examples

    Basic opening

    local fyler = require('fyler')
    fyler.open()

    Opening with specific options

    -- Open as a left most split
    fyler.open({ kind = "split_left_most" })
    
    -- Open with a specific directory
    fyler.open({ root_path = "~" })

    Creating keymaps

    local fyler = require('fyler')
    
    -- Simple mapping
    vim.keymap.set("n", "<leader>e", fyler.open, { desc = "Fyler.nvim - Open" })
    
    -- Mapping with custom arguments via a wrapper function
    vim.keymap.set(
        "n",
        "<leader>e",
        function() fyler.open({ kind = "split_left_most" }) end,
        { desc = "Fyler.nvim - Open" }
    )
    local fyler = require('fyler')
    fyler.open({ kind = "split_left_most" })
  3. Open Fyler using Vim commands

    main

    You can open the file manager directly from the command line using the :Fyler command. Supported options include:

    • :Fyler: Opens the finder with default settings.
    • :Fyler root_path=<path>: Opens Fyler at a specific directory path.
    • :Fyler kind=<buffer_kind>: Opens Fyler using a specific window/buffer kind.
    :Fyler                    " Open the finder
    :Fyler root_path=<path>   " Use a different directory path
    :Fyler kind=<buffer_kind> " Open specified kind directly