Vim and neovim allow you to create config files which are local to a specific directory. I use this for some projects to add a build hotkey.
First, you need to configure vim / neovim to allow local configs:
vim.o.exrc = true
Then you just create .nvim.lua or .exrc in your project's directory:
local map = vim.api.nvim_set_keymap
map("n", "<space>r", ":terminal cargo run --features bevy/dynamic_linking<CR>", {
desc = "Run game",
noremap = true,
})