Skip to content

MaximilianLloyd/adjacent.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Adjacent.nvim

A tiny telescope extension to find files in the same directory as the current buffer.


The problem

You're working a on a large codebase with a lot of directories and similar file names. Usually you're working on components or modules for an extended period. You want to quickly be able to find the relevant associated files. But also be able to jump into another component and having the same utility without having to manage some sort of bookmark system.

The solution

Being able to search files adjecent to the one you're currently working on. In the example shown below i can just search for "scss" instead of the file name.

alt text


Installaton

...
use({ "MaximilianLloyd/adjacent.nvim" })
...

Register telescope extension

telescope.load_extension("adjacent")

Configure search level

	extensions = {
		adjacent = {
			level = 1 -- default
		}
	},

Running

It can be run by using Telescope adjacent.

Then you can map to a key

vim.keymap.set("n", "<leader>fa", "<cmd>Telescope adjacent<CR>", { noremap = true, silent = false })

Todo

  • [] Ignoring directories
  • [] Be able to send adjacent files to quickfix list

About

A tiny telescope extension to find files in the same directory as the current buffer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages