Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/josiah-tan/makefile-nvim
- Owner: Josiah-tan
- Created: 2022-02-18T09:58:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T12:03:40.000Z (9 months ago)
- Last Synced: 2024-11-12T00:37:23.235Z (about 2 months ago)
- Language: Lua
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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})
```