/telescope-makefile

Primary LanguageLuaGNU Affero General Public License v3.0AGPL-3.0

telescope-makefile

Simple telescope extension to run GNU Make targets in Neovim.

šŸ‘Supports GNU/BSD make

Requires the akinsho/nvim-toggleterm.lua plugin for now.

Demonstration

Demo gif

Install

For LunarVim, in your config.lua:

lvim.plugins = {
  {
    "sopa0/telescope-makefile",
  },
}

Installation

require'telescope'.load_extension('make')

Usage

:Telescope make

Configuration

Default:

require'telescope-makefile'.setup{
  -- The path where to search the makefile in the priority order
  makefile_priority = { '.', 'build/' }
  default_target = '[DEFAULT]', -- nil or string : Name of the default target | nil will disable the default_target
  make_bin = "make", -- Custom makefile binary path, uses system make by def
}

Example keybinding in LunarVim and which-key:

lvim.builtin.which_key.mappings.M = {
  "<cmd>Telescope make<cr>",
  "Make Targets",
}