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 <CTRL-O>
for fast returns.
Install this plugin using a plugin manager of choice then setup
the plugin:
local proximity = require("proximity")
proximity.setup({
targets = {
["<leader>pc"] = { "CHANGELOG.md" },
["<leader>pr"] = { "README.md" },
},
})
The above setup
options show placeholder values and can be forgone if no other
targets
are used.
Different configurations can find certain files in some other common situations.
Search for files in related directories on the quest upwards:
proximity.setup({
targets = {
["<leader>pm"] = { ".github/MAINTAINERS_GUIDE.md" },
},
})
Attempt to find different files using the same motion:
proximity.setup({
targets = {
["<leader>pp"] = { "package.json", "pyproject.toml" },
},
})