Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zimeg/proximity.nvim

find the nearest matching file fast
https://github.com/zimeg/proximity.nvim

neovim

Last synced: 21 days ago
JSON representation

find the nearest matching file fast

Awesome Lists containing this project

README

        

# proximity.nvim

Jump to the nearest upward matching file in one fast motion. Helpful when
navigating to known places from the depts of a project. Better when followed
with `` for fast returns.

Install this plugin using a plugin manager of choice then `setup` the plugin:

```lua
local proximity = require("proximity")

proximity.setup({
targets = {
["pc"] = { "CHANGELOG.md" },
["pr"] = { "README.md" },
},
})
```

The above `setup` options show placeholder values and can be forgone if no other
`targets` are used.

## Customizations

Different configurations can find certain files in some other common situations.

### Adjacent files

Search for files in related directories on the quest upwards:

```lua
proximity.setup({
targets = {
["pm"] = { ".github/MAINTAINERS_GUIDE.md" },
},
})
```

### Multiple matches

Attempt to find different files using the same motion:

```lua
proximity.setup({
targets = {
["pp"] = { "package.json", "pyproject.toml" },
},
})
```