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.
taolf/README.md

56 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

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)
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
2024-01-29 00:45:42 +01:00
require("taolf").setup({
2024-01-29 10:41:16 +01:00
-- 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 = "",
2024-01-29 00:36:18 +01:00
}
2024-01-29 01:41:00 +01:00
vim.keymap.set("n", "<Leader>el", function() require("lf").start() end,
2024-01-29 02:14:06 +01:00
{ desc = "Open Lf" })
2024-01-29 10:41:16 +01:00
vim.keymap.set("n", "<Leader>ec", function() require("lf").start({ dir = "fd"}) end,
2024-01-29 00:36:18 +01:00
{ 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" })
```
2024-01-29 00:36:18 +01:00
lazy.nvim setup:
```lua
2024-01-29 00:36:18 +01:00
{
"ssnailed/taolf",
event = "VeryLazy",
opts = {
2024-01-29 00:45:42 +01:00
-- The Command to start lf with
default_cmd = "lf",
2024-01-29 00:36:18 +01:00
2024-01-29 00:45:42 +01:00
-- The path to start lf in.
-- "gwd" expands to the git working directory
2024-01-29 10:41:16 +01:00
-- "fd" expands to the open file's directory
2024-01-29 11:24:24 +01:00
dir = "",
2024-01-29 00:36:18 +01:00
},
dependencies = { "akinsho/toggleterm.nvim" },
keys = {
2024-01-29 02:14:06 +01:00
{ "<Leader>el", function() require("taolf").start() end, desc = "Open Lf" },
2024-02-12 16:54:00 +01:00
{ "<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" },
2024-01-29 00:36:18 +01:00
}
}
2022-04-10 07:24:21 +02:00
```