Skip to content

stefanwatt/trek.nvim

Repository files navigation

trek.nvim is a neovim file explorer allowing you to manipulate the filesystem with a text based interface. Use all your muscle memory.

image


✨ Features

  • 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

trek-selection-mode


📦 Installation

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
}

🚀 Usage

Open trek.nvim at the current path

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.


🔑 Default Keymaps

  • Close: q
  • Go into directory: <Right>
  • Go out of directory: <Left>
  • Synchronize view: =
  • Mark entry: <Tab>

🙏 Special Thanks

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published