Skip to content
/ taolf Public
forked from lmburns/lf.nvim

Lf file manager for Neovim (in Lua)

License

Notifications You must be signed in to change notification settings

ssnailed/taolf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taolf

This is a neovim plugin for the lf file manager.

It's stripped down fork of lf.nvim

I stripped out the parts of code that overwrite the default toggleterm configurations, as I find they get in the way more often than not. I also streamlined the installation process with lazy.nvim a tiny bit.

NOTE: This plugin uses toggleterm.nvim.

Installation

Setup:

require("taolf").setup({
    -- The Command to start lf with.
    default_cmd = "lf",
    -- The dir to start lf in.
    -- "gwd" expands to the git working directory.
    -- "fd" expands to the open file's directory.
    dir = "",
}

vim.keymap.set("n", "<Leader>el", function() require("lf").start() end,
    { desc = "Open Lf" })
vim.keymap.set("n", "<Leader>ec", function() require("lf").start({ dir = "fd"}) end,
    { desc = "Open Lf in directory of open file" })
vim.keymap.set("n", "<Leader>eg", function() require("lf").start({ dir = "gwd" }) end,
    { desc = "Open Lf in git working directory" })

lazy.nvim setup:

{
    "ssnailed/taolf",
    event = "VeryLazy",
    opts = {
        -- The Command to start lf with
        default_cmd = "lf",

        -- The path to start lf in.
        -- "gwd" expands to the git working directory
        -- "fd" expands to the open file's directory
        dir = "",
    },
    dependencies = { "akinsho/toggleterm.nvim" },
    keys = {
        { "<Leader>el", function() require("taolf").start() end, desc = "Open Lf" },
        { "<Leader>ec", function() require("taolf").start({ dir = "fd" }) end, desc = "Open Lf in directory of open file" },
        { "<Leader>eg", function() require("taolf").start({ dir = "gwd" }) end, desc = "Open Lf in git working directory" },
    }
}

About

Lf file manager for Neovim (in Lua)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%