Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josiah-tan/makefile-nvim

telescope integration with makefiles
https://github.com/josiah-tan/makefile-nvim

Last synced: 20 days ago
JSON representation

telescope integration with makefiles

Awesome Lists containing this project

README

        

# Makefile-nvim

Telescope integration with makefiles\!

# Plugin Dependencies and Installation

- Telescope and its dependencies
- Note that telescope is neovim 0.5 + only
- so build your neovim from source, or get the latest
release\!
- Here is an example using
[vim-plug](https://github.com/junegunn/vim-plug) here
- but feel free to use whatever plugin manager that you like\!

``` vim
" This is a requirement, which implements some useful window management
" items for neovim
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'

" fuzzy finder etc...
Plug 'nvim-telescope/telescope.nvim'
" compiled fzy sorter (hence faster)
Plug 'nvim-telescope/telescope-fzy-native.nvim'

" for terminal integration
Plug 'ThePrimeagen/harpoon'

"Plugin for Makefile integration
Plug 'Josiah-tan/makefile-nvim'
```

# Setup

- This setup function is important for initializing the plugin, any
default options can be set here

``` lua
-- no defaults by default
require("makefile_nvim").setup()
-- using terminal 1 by default
require("makefile_nvim").setup({term = 1})
```

# Mappings

- below are some mappings that might be useful to use
- note that if \`selection\` is a string, the make command
combined with the \`selection\` is sent to the terminal without
evoking telescope

``` lua
vim.api.nvim_set_keymap("n", "mf", ':lua require("makefile_nvim.builtin").makeFile({term = 1})', {noremap = true, silent = true, expr = false})
vim.api.nvim_set_keymap("n", "ma", ':lua require("makefile_nvim.builtin").makeFile({term = 1, selection = "all"})', {noremap = true, silent = true, expr = false})
vim.api.nvim_set_keymap("n", "mc", ':lua require("makefile_nvim.builtin").makeFile({term = 1, selection = "clean"})', {noremap = true, silent = true, expr = false})
```