/telescope-makefile

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

telescope-makefile

Simple telescope extension to run GNU Make targets in Neovim.

Only tested on GNU/Linux.

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

Demonstration

Demo gif

Install

For LunarVim, in your config.lua:

lvim.plugins = {
  {
    "ptethng/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/' },
  toggle_term = {
    cmd = 'make',
    direction = 'float',
    close_on_exit = false,
  },
}

Example keybinding in LunarVim and which-key:

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