trek.nvim is a neovim file explorer allowing you to manipulate the filesystem with a text based interface. Use all your muscle memory.
- Miller Column Navigation: I loved this as soon as I first tried it
- Static Layout: I prefer a static, 3-column, full-height layout like in ranger
- LSP Integration: Took lsp renaming functionality from oil.nvim and integrated it
- Selection Mode: Select files and perform batch operations
Using lazy.nvim:
{
"stefanwatt/trek.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
lazy = false,
keys = {
{
"<leader>e",
mode = { "n" },
function()
require("trek").open(vim.api.nvim_buf_get_name(0))
end,
desc = "File Explorer",
},
},
config = function()
require("trek").setup({
keymaps = {
close = "q",
go_in = "<Right>",
go_out = "<Left>",
synchronize = "=",
mark_entry = "<Tab>",
}
});
end
}
You can open trek.nvim
at the current path with this command:
require("trek").open(vim.api.nvim_buf_get_name(0))
The open
function for trek.nvim
can be used to open the directory of any given file path.
- Close:
q
- Go into directory:
<Right>
- Go out of directory:
<Left>
- Synchronize view:
=
- Mark entry:
<Tab>
This project is inspired by and includes code from:
- mini.files — for large part of the code, especially filesystem
- oil.nvim — for LSP renaming functionality