snailed
/
taolf
Archived
2
0
Fork 0
This repository has been archived on 2024-05-03. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Luca Bilke ac6c8bf9bb
more streamlining, redo readme
2024-01-29 00:36:18 +01:00
doc update: minor refactor, add `argedit` and `edit` bindings 2023-08-09 15:48:28 -05:00
lua more streamlining, redo readme 2024-01-29 00:36:18 +01:00
.gitignore fix#2: fixes error indexing vim.fs 2022-07-19 14:35:57 -05:00
LICENSE chore: added license, mentioned keybindings, tmux=false, spelling corrections 2022-04-16 22:20:45 -05:00
README.md more streamlining, redo readme 2024-01-29 00:36:18 +01:00

README.md

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("lf").setup({
    default_cmd = "lf", -- The Command to start lf with
    dir = "", -- The dir to start lf in. "gwd" expands to the git working directory
}

vim.keymap.set("n", "a<Leader>el", require("lf").start, { desc = "Open Lf" })
vim.keymap.set("n", "<Leader>ec", function() require("lf").start({ dir = "cwd" }) 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 = {
        default_cmd = "lf", -- The Command to start lf with

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