This plugin aims to run Make targets from your project, if a Makefile is found.
┌────────────────────────────────────────────────────────────────────┐
│ │
│ │
│ ╭──────────────────── my-project ────────────────────╮ │
│ │ docker-build Build the docker image │ │
│ │ docker-push Push the docker image │ │
│ │ docker-run Run the docker image │ │
│ │ install-ci Install the CI dependencies │ │
│ │ install-dev Install the dev dependencies │ │
│ │ lint Lint the code with Ruff │ │
│ │ test Run the tests │ │
│ │ │ │
│ │ Finished command (exit code: 0) │ │
│ ╰────────────────────────────────────────────────────╯ │
│ │
│ │
└────────────────────────────────────────────────────────────────────┘
- Neovim >0.40
- plenary.nvim - Required for async job execution
return {
"benmatselby/nvim-make",
dependencies = {
"nvim-lua/plenary.nvim",
},
cmd = "NvimMake",
opts = {},
keys = {
{
"<leader>xm",
function()
require("nvim_make").pick_make_target()
end,
desc = "Run make target",
},
},
}You can also provide a specific project path to target a Makefile in a different directory, bypassing the automatic discovery:
keys = {
{
"<leader>xp",
function()
require("nvim_make").pick_make_target("/path/to/project")
end,
desc = "Run make target for specific project",
},
}Or via the command:
:NvimMake /path/to/project