2024-01-29 00:36:18 +01:00
|
|
|
## taolf
|
2022-04-10 07:24:21 +02:00
|
|
|
|
|
|
|
This is a neovim plugin for the [`lf`](https://github.com/gokcehan/lf) file manager.
|
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
It's stripped down fork of [`lf.nvim`](https://github.com/lmburns/lf.nvim)
|
2023-05-10 03:36:50 +02:00
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
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.
|
2023-07-20 04:28:59 +02:00
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
**NOTE**: This plugin uses [`toggleterm.nvim`](https://github.com/akinsho/toggleterm.nvim).
|
2022-05-27 01:53:27 +02:00
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
### Installation
|
2022-04-10 07:24:21 +02:00
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
Setup:
|
2022-04-10 07:24:21 +02:00
|
|
|
```lua
|
2022-04-11 02:42:15 +02:00
|
|
|
require("lf").setup({
|
2024-01-29 00:36:18 +01:00
|
|
|
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" })
|
2022-04-11 02:42:15 +02:00
|
|
|
```
|
|
|
|
|
2024-01-29 00:36:18 +01:00
|
|
|
lazy.nvim setup:
|
2022-04-11 02:42:15 +02:00
|
|
|
```lua
|
2024-01-29 00:36:18 +01:00
|
|
|
{
|
|
|
|
"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" },
|
|
|
|
}
|
|
|
|
}
|
2022-04-10 07:24:21 +02:00
|
|
|
```
|