Skip to content

benmatselby/nvim-make

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make plugin for neovim

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)                    │       │
│       ╰────────────────────────────────────────────────────╯       │
│                                                                    │
│                                                                    │
└────────────────────────────────────────────────────────────────────┘

Prerequisites

  • Neovim >0.40
  • plenary.nvim - Required for async job execution

Configuration

Lazy.nvim

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

About

Neovim plugin to run make targets

Resources

Stars

Watchers

Forks

Contributors